I have started working on a new project and am switching from LinqToSQL
to EF 4.1 as my ORM.
I already have a database set up to work with and so am going with the database first approach. By default the EF generates a context which extends ObjectContext
. I wanted to know if a good approach would be to replace it with DbContext
.
Most of the available examples deal with only Code First and DbContext
but DBContext
can be used with Database First too. Are there any advantages I get by using the DBContext? From what I have read the DBContext is a simplified version of the ObjectContext and makes it easier to work with. Are there any other advantages or disadvantages?