Whenever we develop a new application, lots of things play key role to decide application architecture. Among these, database interaction is the major. In earlier days of .NET 2.0, no significant tools were available from Microsoft to create data access layer for database interaction. People had to use third party utilities for conceptual data modeling over the physical database.
Realizing this need Microsoft introduced LINQ to SQL for conceptual data modeling, though it comes with limited set of functionalities and can be used by SQL Server database only. To overcome this situation, Microsoft has taken steps to release new feature called Entity Framework with ADO.NET 3.5 SP1 release.
ADO.NET Entity Framework is an Object – Relational Mapping (ORM) framework. It builds on the concept of Entity Relationship Model by introducing a conceptual model, called the Entity Data Model (EDM) which sits between your code and the underlying schema (database). This abstraction helps a lot to reduce the efforts as well the complexity for moving relational data to object oriented programming.
Entity Framework architecture:
Here is how the Entity Framework is layered to abstract the relational schema of a database and present a conceptual model.
Advantages:
- You can use the Entity Framework against not only SQL Server but also Oracle, DB2, Informix, MySQL, Postgres etc with the help of its data providers.
- You can create data access layer with the ease of Entity Framework wizards. Developer can work with data rather than coding against rows and columns.
- It is truly a foundation stone for Microsoft’s data access platform. one of the use of this platform is REST based ADO.NET data service aka Astoria.
