0

Following the tutorial on http://msdn.microsoft.com/en-us/data/gg715119 it describes adding an EDMX Entity Data Model to my solution (which generates cluttered models including ObjectContext from my db) and after that the tutorial generates a DbContext by clicking "Add item..." on the EDMX designer (because this is where the option Generate DbContext is available).

Is this the way to go if I want to work with EF 4.3 DbContext? Isn't it possible somehow to create a model from my database while only using DbContext?

I don't really want the ObjectContext with EDMX file in my solution. Just the .tt files. Is this possible?

1 Answer 1

2

If you want to use DbContext (or any other template) you have to first turn off default code generation which produces ObjectContext - in EDMX property window remove custom tool for code generation.

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

1 Comment

Great, I thought I was missing something here!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.