Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / C#

About Entity Framework

2.46/5 (6 votes)
26 Dec 2009CPOL1 min read 7.3K  
From past few days i was doing some R & D on the upcoming Entity framework from Microsoft, and i found it was interesting in many ways,The first part which i liked the most is -Querying to the Entity Data Model(EDM) rather than the real data store.At a high level , we have plenty of...
From past few days i was doing some R & D on the upcoming Entity framework from Microsoft, and i found it was interesting in many ways,

The first part which i liked the most is -

Querying to the Entity Data Model(EDM) rather than the real data store.

At a high level , we have plenty of options to query for the data store.

some of the options i had listed down here.

1) By using ObjectService API
2) By using Entity Client
3) By using LINQ to Entities
4) By usnig LINQ to SQL
5) By using Object Builder

The second part which i liked the most is - about the pattern which is invloved for any querying (Pattern : Unit of Work)

This is achieved by using the Class which is derived from the ObjectContext, which knows what happens to the entities(EntityObject)(New,Edit,Delete) during its(Context) life time, Hence context knows how to update the status back to the data store when the user finally submits back.(by doing many operations locally on the entities and finally invokes the command to the store),Best part is Entity framework know what command to generate depends on the status(EntityState) of the Entity.

How cool right???

Happy reading

Regards
-Vinayak

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)