Open In App

What is Entity Framework in .NET Framework?

Entity Framework is an open-source object-relational mapper framework for .NET applications supported by Microsoft. It increases the developer’s productivity as it enables developers to work with data using objects of domain-specific classes without focusing on the underlying database tables and columns where this data is stored. It eliminates the need for most of the data-access code which is used to interact with the database that developers usually need to write. It provides an abstract level to the developers to work with a relational table and columns by using the domain-specific object. It also reduces the code size of the data specific applications and also the readability of the code increases by using it. This is a new technology for accessing the data for Microsoft application. The latest version for Entity Framework is 6.0.

The following figure describes where the Entity Framework present in your application.



The above figure represents how an entity framework interacts with the domain class and database. It provides a connection between the business entity and data tables in the database. It saves data stored in the properties of business entities and also retrieves data from the database and converts it to business entities objects automatically. Entity Framework will execute the relevant query in the database and then materialize results into instances of your domain objects for you to work within your app.



Conceptual Model

When defining the class and features of entity framework first and then entity framework convert it into the conceptual model first and it creates database and objects in the database from the conceptual model this method is called Code First. Now your object directly works with the database to retrieve or make changes.

Features of Entity Framework

Reference: https://docs.microsoft.com/en-in/ef/ef6/

Article Tags :
C#