Getting Started Pick your modeling workflow DB First, Model First, Code First Use DbContext for new projects ObjectContext accessible if you need it Database? Existing or let Code First/Model First create it Database or Model Changes Model Updates & DB Updates (“migrations”) supported Consider architecture*Separate projects for model, context, etc *Repositories, UOW, automated tests, etc.
UI Service Layer Bus Layer Repo/UoW LINQData Layer EFDatabase
Testable Classes System.Data.Entity FakeObject/DbSet Fake Metadata & Fake Context & DataA Object/DbContext Context & Data B Class Class Class Repositories Class RepositoriesTests Repositories Repositories Unit of Work UI
Some “controversies”EF &Repository/Unit of WorkAbstracting ORMs
Resources• MSDN Developer Center: msdn.com/data/ef• EF Team: blogs.msdn.com/adonet• Rowan Miller Blog: romiller.com• Arthur Vickers: blog.oneunicorn.com• Julie Lerman: thedatafarm.com/blog• LearnEntityFramework.com• Pluralsight.com videos• MSDN Magazine Data Points Column – http://JulieL.me/datapointscolumn