0

Possible Duplicate:
ObjectContext vs DbContext

What is the difference between DBContext and Object context in Entity Framework? Do they differ only in properties or they have any other significant difference?

1

1 Answer 1

0

ObjectContext for EF v4.0 and when using a designer generated model and DbContext with for a EF v4.1 code first model.

Altough they are pretty much the samen, DbContext requires a lot less code for the same kind of functionality.

Sign up to request clarification or add additional context in comments.

1 Comment

DbContext is not only for code first model. DbContext is a wrapper around the ObjectContext. You can also access ObjectContext by DbContext if you need. ObjectContext came with EF4 and DbContext with EF4.1. Basically both contexts are almost same. DbContext simplifies many things and moreover it is more clear.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.