Add New Skills!

Udemy
Showing posts with label Entity Framework 4.0. Show all posts
Showing posts with label Entity Framework 4.0. Show all posts

Tuesday, April 19, 2011

Entity Framework 4.0

The below summary has been created from the MSDN webcast Benkotips live on demand: Dive into Entity Framework 4.0 for my future reference.

Why an ORM?



ORM gives you the ability to check the validity of your code at compile time. In the above example if "FirstName" was spelled incorrectly, the code would compile fine but throw an error at run time.

ORM lets you create classes and map them to tables in a database thereby letting you correct the code at compile time.


Entity Framework 4.0


The EDM is a design/visualization of what our database looks like.Classes can be created and mapped to the EDM - create a data model and map it out to classes. In the Entity Framework, the database is  abstract and the application doesn't need to know whether it is a SQL or Oracle database.

Entity Framework 1.0 features


Pain Points of the Entity Framework 1.0


Entity Framework 4.0




Example of Mapping Entities in Visual Studio 2010
 
ScreenShot028
In the above example LiveEvent and Webcast entities are mapped to Events.
 
ScreenShot030 ScreenShot029

ScreenShot025

ScreenShot026

ScreenShot027

ScreenShot031

resources

http://blogs.msdn.com/b/efdesign/

http://blogs.msdn.com/b/astoriateam/

http://www.odata.org/blog

http://blogs.msdn.com/b/adonet/

http://msdn.microsoft.com/en-us/data

http://geekswithblogs.net/iupdateable/Default.aspx