Entity Framework
This presentation tells you :
Basics of Entity Framework
What is EF?
• Entity framework is an Object/Relational Mapping (O/RM)
framework. It is an enhancement to ADO.NET that gives developers
an automated mechanism for accessing & storing the data in the
database and working with the results in addition to Data Reader and
Dataset.
What is O/RM?
• ORM is a tool for storing data from domain objects to relational
database like MS SQL Server in an automated way without much
programming.
Different approaches of EF
• a) Model First
• b) Code First
• c) Database First
Model First
• In the Model First approach, the database model is created first using
the ORM designer in Visual Studio. Once the model consisting of
entities and relationships has been designed, the physical database
will be generated from the model.
• For Example: Go through this link: https://www.simple-
talk.com/dotnet/.net-framework/different-approaches-of-entity-
framework/
Code First
• In Code-First Approach, we create the classes first and then generate
the database from the classes directly. In code first, we won’t use the
Entity Designer (for editing .edmx files) at all.
• For Example: Go through this link: https://www.simple-
talk.com/dotnet/.net-framework/different-approaches-of-entity-
framework/
Database First
• The next approach supported by the Entity Framework is the
database-first approach. In the database first approach, we are
creating the entity framework from an existing database. We use all
other functionality, such as the model/database sync and the code
generation, in the same way we used them in the Model First
approach.
• For Example: Go through this link: https://www.simple-
talk.com/dotnet/.net-framework/different-approaches-of-entity-
framework/
Advantages of EF
• Reduced development time: the framework provides the core data access
capabilities so developers can concentrate on application logic.
• Developers can work in terms of a more application-centric object
model, including types with inheritance, complex members, and relationships. In
.NET Framework 4, the Entity Framework also supports Persistence Ignorance
through Plain Old CLR Objects (POCO) entities.
• Applications are freed from hard-coded dependencies on a particular data engine
or storage schema by supporting a conceptual model that is independent of the
physical/storage model.
• Mappings between the object model and the storage-specific schema can change
without changing the application code.
• Language-Integrated Query support (called LINQ to Entities) provides IntelliSense
and compile-time syntax validation for writing queries against a conceptual
model.

Ef overview

  • 1.
    Entity Framework This presentationtells you : Basics of Entity Framework
  • 2.
    What is EF? •Entity framework is an Object/Relational Mapping (O/RM) framework. It is an enhancement to ADO.NET that gives developers an automated mechanism for accessing & storing the data in the database and working with the results in addition to Data Reader and Dataset.
  • 3.
    What is O/RM? •ORM is a tool for storing data from domain objects to relational database like MS SQL Server in an automated way without much programming.
  • 4.
    Different approaches ofEF • a) Model First • b) Code First • c) Database First
  • 5.
    Model First • Inthe Model First approach, the database model is created first using the ORM designer in Visual Studio. Once the model consisting of entities and relationships has been designed, the physical database will be generated from the model. • For Example: Go through this link: https://www.simple- talk.com/dotnet/.net-framework/different-approaches-of-entity- framework/
  • 6.
    Code First • InCode-First Approach, we create the classes first and then generate the database from the classes directly. In code first, we won’t use the Entity Designer (for editing .edmx files) at all. • For Example: Go through this link: https://www.simple- talk.com/dotnet/.net-framework/different-approaches-of-entity- framework/
  • 7.
    Database First • Thenext approach supported by the Entity Framework is the database-first approach. In the database first approach, we are creating the entity framework from an existing database. We use all other functionality, such as the model/database sync and the code generation, in the same way we used them in the Model First approach. • For Example: Go through this link: https://www.simple- talk.com/dotnet/.net-framework/different-approaches-of-entity- framework/
  • 8.
    Advantages of EF •Reduced development time: the framework provides the core data access capabilities so developers can concentrate on application logic. • Developers can work in terms of a more application-centric object model, including types with inheritance, complex members, and relationships. In .NET Framework 4, the Entity Framework also supports Persistence Ignorance through Plain Old CLR Objects (POCO) entities. • Applications are freed from hard-coded dependencies on a particular data engine or storage schema by supporting a conceptual model that is independent of the physical/storage model. • Mappings between the object model and the storage-specific schema can change without changing the application code. • Language-Integrated Query support (called LINQ to Entities) provides IntelliSense and compile-time syntax validation for writing queries against a conceptual model.