the entity diagram code generation item option appears to not work in vs2012 . if i create a new project and add a entity data model,
with some tables from my database, then compile my project. When i then right click on the entity diagram and select codegeneration item the dialog which opens asks to choose a project type and no items are selectable, if i choose online and select the ef5.x
dbcontext generator for c# nothing appears to happen after adding, i cannot see any new items added to the solution.
this does work in vs2010. with mvc4rc and using ef5.
I can't reproduce this issue with the VS 2012 RC. After adding the DbContext templates I see a MyModel.Context.tt and a MyModel.tt file added to my project where MyModel is the name I used.
If you right click on the designer surface and select properties what do you see for "Code Generation Strategy"? Is it None or Default?
tbertenshaw
0 Points
4 Posts
Database First, DbContext Missing
Jun 01, 2012 02:41 PM|LINK
Hi,
the entity diagram code generation item option appears to not work in vs2012 . if i create a new project and add a entity data model,
with some tables from my database, then compile my project. When i then right click on the entity diagram and select codegeneration item the dialog which opens asks to choose a project type and no items are selectable, if i choose online and select the ef5.x dbcontext generator for c# nothing appears to happen after adding, i cannot see any new items added to the solution.
this does work in vs2010. with mvc4rc and using ef5.
Cheers
Tim
EntityFramework dbcontext
ajcvickers
Member
2 Points
1 Post
Re: Database First, DbContext Missing
Jun 20, 2012 03:53 PM|LINK
Hi Tim,
I can't reproduce this issue with the VS 2012 RC. After adding the DbContext templates I see a MyModel.Context.tt and a MyModel.tt file added to my project where MyModel is the name I used.
If you right click on the designer surface and select properties what do you see for "Code Generation Strategy"? Is it None or Default?
Thanks,
Arthur
EntityFramework dbcontext
AukI
Member
4 Points
2 Posts
Re: Database First, DbContext Missing
Jul 17, 2012 05:03 PM|LINK
If you want to use database first then you can use my drawn approach to go thorough.
Here is the link for database first approach:
http://auk-port.blogspot.com/2011/05/how-to-create-database-first-in-aspnet.html