Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to start with Entity Framework [closed]

Anyone know a good book or post about how to start in EF? I have seen the DnrTV any other place?

like image 415
Jedi Master Spooky Avatar asked Sep 03 '08 23:09

Jedi Master Spooky


People also ask

Do we need to close connection in Entity Framework?

If we have multiple DbContexts with the same connection then the connection should be disposed of whenever the first closes the connection. Similarly things should happen for the mixed mode of ADO.Net and Entity Framework. DbContext always closes the connection when it is disposed of.

Should DbContext be disposed?

Don't dispose DbContext objects. Although the DbContext implements IDisposable , you shouldn't manually dispose it, nor should you wrap it in a using statement. DbContext manages its own lifetime; when your data access request is completed, DbContext will automatically close the database connection for you.

Does DbContext dispose close connection?

So if you have more than one DbContext with the same connection whichever context is disposed first will close the connection (similarly if you have mixed an existing ADO.NET connection with a DbContext, DbContext will always close the connection when it is disposed).


1 Answers

Mike Taulty's Blog: http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/category/1024.aspx

A great EF intro deck: http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/03/13/10235.aspx

And these ADO.NET Data Services screencasts are nice too: http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/01/25/10152.aspx

ADO.NET Entity Framework MSDN: http://msdn.microsoft.com/en-us/library/bb399572.aspx

ADO.NET Entity Framework forums: http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=533&SiteID=1

ADO.NET team blog: http://blogs.msdn.com/adonet/archive/tags/Entity+Framework/default.aspx

Programming LINQ and the ADO.NET Entity Framework Webcast: http://blogs.msdn.com/adonet/archive/2008/01/28/programming-linq-and-the-ado-net-entity-framework-webcast.aspx

like image 66
Jon Erickson Avatar answered Oct 17 '22 21:10

Jon Erickson