Entity Framework – Microsoft’s Step Towards ORM Building

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.

Entity Framework Architecture
  • Data Source: It represents one or many databases.
  • ADO.NET Data Providers: It will access data from data source.
  • Entity Data Model (EDM): EDM contains entity classes, storage container and mapping of the entity with the table.
  • Entity Client: It is an ADO.NET managed provider that supports accessing data described in an EDM.
  • Object Services: This component enables you to query, insert, update, and delete data, expressed as strongly typed CLR objects that are instances of entity types.
  • Entity SQL (ESQL): It is a derivative of Transact-SQL, designed to query and manipulate entities. Both Object Services and Entity Client components can execute Entity SQL statements.
  • LINQ to Entities: It is used to query against entities defined in the EDM.

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.

How to build:

Visual Studio 2008 and onward have ADO.NET Entity Data Model (.edmx) template which can be used to generate entity relationship. Using the template, wizards helps you to generate the entity model relationship.

Conclusion:

ADO.NET Entity Framework is interesting technology for data accessing requirements. Microsoft has put a welcome step to reduce the developer headache.

This means that developers can focus more on solving business problems and contribute towards organization’s goals to help the customers by supporting their business effectively.

Stay tuned to explore more about Entity Framework in the following posts.

About the author

punitraval Punit Raval is serving as a Senior Analyst at Gateway since last 3 years. He has overall 6+ years of experience in the Information Technology field. He likes to be updated with latest technology and trends. He loves to read books in free time.

Tags: , , ,

3 Responses to “Entity Framework – Microsoft’s Step Towards ORM Building”

  1. Kavyen says:

    Punit,

    Very Good Article.

    You have explained the Entity Framework in short and effective way. Entity Framework is envisioned as one of the most reliable, viable & robust Data Access Pattern. It also plays vital role in creation of RIA Applications using ADO.Net Services.

    Keep Posting :)

  2. [...] This post was mentioned on Twitter by Gateway Technolabs , Sunil A.Nair. Sunil A.Nair said: RT @gtwlabs: GTL.Blog: Entity Framework – Microsoft's Step Towards ORM Building http://wp.me/pUj5q-5l #dotnet #entityframework #LINQ [...]

  3. Divyesh says:

    Hey Punit,

    Thank you for sharing your knowledge on Entity framework. Gr8 happy writing..

Leave a Reply

CommentLuv Enabled