Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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[^]
Posted
Updated 24-Nov-14 18:17pm
v2

Supposing that your Entity Data Model is in a 2nd project/assembly, you have to build that project first than you can use it in you ASP.NET MVC project.
 
Share this answer
 
Comments
King Fisher 25-Nov-14 1:29am    
I have builded my Solutions when i update table in Entity data Model.
Raul Iloc 25-Nov-14 1:45am    
So it is working now or not?
King Fisher 25-Nov-14 1:55am    
no sir,doesn't show any new models in the Scaffolding Options.its show only old models which i have selected while Creating the Entity data Models.
do i have to Delete the Data Model and Regenerate again?
Raul Iloc 25-Nov-14 2:01am    
You should clean you solution, then rebuild all and try again.
If will not working, after these new steps, you should close then restart the Visual Studio.
King Fisher 25-Nov-14 2:04am    
Is Build Solution and Rebuild Solution are different?
Hello Sir,

Step1- You need to build the solution once after Updating and Validating the .edmx file.
Step2- Then you need to expand the .edmx file and look for the T4 template file, i.e. .tt extension file.
Step3- Right click on that and Run Custom Tool. This would update the .tt file with the newly added entity making a .cs file for that.

Hope this helps Sir.
Thanks.
 
Share this answer
 
v2
Comments
King Fisher 25-Nov-14 11:21am    
Its worked buddy .thank you my 5+
[no name] 25-Nov-14 11:31am    
Thanks Sir. Happy my solution helped. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900