Entity Framework
What is the difference between DataContext and ObjectContext?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Prakash KumarPosted Oct 31, 2016, 2:43 AM
Ervis TrupjaPosted Oct 25, 2016, 7:51 AM
accepted
DbContext is a lightweight version of the ObjectContext class, which is laid almost right on top of ObjectContext (there is even a way to get to the ObjectContext from just the DbContext). It's also a lot easier to use, IMO, and makes CRUD operations a sinch.
Pravin MorePosted Oct 18, 2016, 3:49 AM
Bikesh SrivastavaPosted Oct 17, 2016, 9:26 AM
DbContextis just a wrapper aroundObjectContextDbContextis just a set of APIs that are easier to use than the APIs exposed byObjectContextAnyway here there is a very simple VS Template that uses Repository Pattern and EF