开发者

EDMX: edmx is not updated in the server

开发者 https://www.devze.com 2023-02-05 21:03 出处:网络
today as a litle task i needed add a new column to my datamodel (edmx file) and it works ok in my development machine. but I tried put my changes to the server the web.page didn\'t work :(

today as a litle task i needed add a new column to my datamodel (edmx file) and it works ok in my development machine. but I tried put my changes to the server the web.page didn't work :( I suppose is because the datamodel is not sync with the database ( in the s开发者_开发问答erver the db is already updated ), but i don't know how to check or how to make sure if i have the last version of my changes related with the datamodel :(. Any suggestion? Thank you!


Have you double-clicked on your EDMX file and opened up the 'work area' (you know where it shows your entities, like this

EDMX: edmx is not updated in the server

Then right click and select Update Model from database and this will cause your EDMX to update to reflect the db model. Hope that helps


I had such an issue once. If you don't have any stored procedured added to the edmx, I would delete all the tables, save, then add all the other tables again. That will do the drill for me... since there is a bug in the update model, it always does the drill.


I think you have added some new columns to your data model. those changes are not transferable to the database unless you want to create a database using this new model. you can select the same database you can delete the app.config connection string, because when you create the new one, you will get the new connection string, so that you will not have to worry about that.

you will not over come the problem by updating the model from the database because the column that you have added to the model is not in the database and it will give an error all the time.

if you do what I have said, you will loose all the data in your existing database, if you select the same database that you are working with.

0

精彩评论

暂无评论...
验证码 换一张
取 消