Total Downloads

2,592,939

Total Files

9,206

Latest Update

10

How to use the DbContext in Entity Framework Core

Posted October 15, 2018 | Windows


Microsoft’s Entity Framework is an open-source object-relational mapper, or ORM, for ADO.Net that helps you isolate the object model of your application from the data model. Entity Framework simplifies data access in your application by allowing you to write code to perform CRUD (Create, Read, Update, and Delete) operations without having to know how the data is persisted in the underlying database.

The DbContext acts as a bridge between the domain classes and the database. In this article we will examine how we can configure the DbContext using an instance of DbContextOptions to connect to a database and perform CRUD operations using the Entity Framework Core provider.

DbContext explained

The DbContext is an integral component of the Entity Framework that represents a connection session with the database. You can take advantage of the DbContext to query data into your entities or save your entities to the underlying database. The DbContext in Entity Framework Core has a number of responsibilities:

  • Managing connections
  • Querying data from the database
  • Saving data to the database
  • Change tracking
  • Caching
  • Transaction management



Source link

')
ankara escort çankaya escort çankaya escort escort bayan çankaya istanbul rus escort eryaman escort ankara escort kızılay escort istanbul escort ankara escort ankara escort escort ankara istanbul rus Escort atasehir Escort beylikduzu Escort Ankara Escort malatya Escort kuşadası Escort gaziantep Escort izmir Escort