How to update ADO.net Entity Data model

I have Entity Data model using auto generate from database.
 
Now, I want to Add another table in Entity Data Model .
 
I Right Clicked the .edmx file added Update model from Database and selected my table .
 
everything fine.i see my new Table in Layout Diagram but when i add new Controller with Scaffolding Options i don't find my new table model only i find only old table model . did i miss anything?
 
Assist me. 

and i have referred this
http://msdn.microsoft.com/en-us/library/vstudio/cc716697%28v=vs.100%29.aspx[^]

King Fisher

when i add new Controller with Scaffolding Options i don’t find my new table model only i find only old table model . did i miss anything?

rebuild all

Hi,

Rebuild your project before add a new controller. You need to do this every time you update .edmx.

Have fun

i have builded my solution  then it doesn’t work and i closed everything again opened my solution nothing happend.Do i have to delete and generate again the Data Entity model

No,

You do not need to delete it. You case is strange. Can you post your new model class. Make sure it has a primary key.

Have fun

i don’t have any model class file . I have only the .edmx  and below that i have some .tt file and all

Hi,

Who create the table? Can you post the table definition only for the new table. It may on SQL definition. Need to make sure it has a primary key.

Have fun.

Have you tried running the custom tool right clicking on the .tt file?

Can you check inside the .tt file(expanding it) if the table class has been generated?

Thanks

King Fisher

Do i have to delete and generate again the Data Entity model

If you really can’t find the problem, then try to do so. Just remove first the generated connection string for your model in your web.config to avoid replication when you generate your edmx model again.

Leave a Reply