Click here to Skip to main content
15,918,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using Entity framework. I changed my database but now those changes not reflected in E.F. what should I do?

In database changes, I add new column in my "sql server" database through sql server management studio. but now this column is not present in Entity framework, when I tried to access it through Entity framework.
Posted
Updated 14-Sep-15 22:40pm
v2

1 solution

You need to open the edmx file by double-clicking on it.
Then click anywhere in that open file. Now right-click on it and you will see a pop-up menu.
Select "Update model from Database...".
If you had added a new object in DB, then under Add tab, select that object to add.
If you had changed an existing object in DB, then click on Refresh tab.
If you had changed a stored proc then expand Function Imports in Model browser shown on right of screen,
right-click on the object that you had changed and then click edit.
Click on Get column information in the resulting screen and make sure that your new changes are shown in that window, then click ok.
 
Share this answer
 

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