Entity Framework is a ORM(Object-Relational-Mapper) that enables .NET developers to work with relational database using domain specific objects
It eliminates the need for most of the data-access code that developers usually need to write
It eliminates the need for most of the data-access code that developers usually need to write
Entity Framework allows you to create a model by writing code or using boxes and lines in the Entity Framework Designer. Both of these approaches can be used to target an existing database or create a new database
There are Four approaches in EF
1. Code First ( to New Database)
2. Code First ( to Existing Database)
3. Model First ( to New Database)
4. Database First ( to Existing Database)
There are two major layers in an Entity Framework application:
- The modeling layer
 - The object layer
 
The modeling layer contains three components:
- A conceptual model consisting of domain-specific entity types and relationships, based on an Entity Data Model
 - A database schema that defines tables and relationships
 - A mapping between the conceptual model and the database schema
 
 Entity Framework object layer enables you to do the following:
- Run queries against the conceptual model.
 - Materialize data returned from the data source as objects.
 - Track changes that were made to the objects.
 - Propagate object changes back to the data source.
 - Bind objects to controls.
 
