Blogger news

Blogger templates

Saturday, July 9, 2011

What is Entity Framework

Entity Framework introduction

Entity Framework is another enhancement to ADO.Net giving developers an added mechanism to access data and working with result. In entity framework all the data access and storage is done against a conceptual model (Model of data table in a database represented by classes and objects).
The entity framework uses a model called Entity Data Model (EDM), which evolved from Entity Relationship Modeling (ERM).

Entity Relationship Modeling (ERM)

An ERM defines schema of entities and their relationships one another. when we think about ORM (Object Relational Mapping) we can say entity is something like schema of a table in a database

Entity Data Model (EDM)

Entity Data Model
we can say it a client side data model because it's making model of a server table in client side and it is the core of entity frame work. Data model in a application describes the structure of bussiness objects.

Let us check the schema of related tables on Northwind database. Please click image to expand.




Above schema represents Customer->Category->Product->Order->OrderDetails relation.

While Visual studio generates entities of above representation it will also generates the association of each tables. Entity frame work can remove the pain of developer to interact with database and it translates tabular data into objects. In entity frame work EDM is represented by a single XML file at design time.

Please Click here to understand CRUD operation using Entity Framework.


No comments:

Post a Comment