如何更新实体framewokr 6.1代码首先更新DataBase [英] how to update Entity framewokr 6.1 code First after updation of DataBase

查看:93
本文介绍了如何更新实体framewokr 6.1代码首先更新DataBase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我已经在我的数据库中添加了一些表,同时处理实体框架代码第一个模型现在我想将所有coulmn包含在我的项目中,包含在数据库中请指导我

hi i have added some tables in my database while working on entity frame code first model now i want to include all that coulmn into my project that were included in database please guide me

推荐答案

您好,

只需打开edmx文件,右键单击相应的edmx文件,从数据库中选择Update Model点击刷新选项卡查看天气列表中是否有您更新的表,然后单击完成并保存新列自动添加。



大部分时间它运行良好,有时它可能无法正常工作只是从实体中删除表中的工作,然后再次添加现在,您可以访问新列。
Hello,
Just Open the edmx file right click the respective edmx file select Update Model from data base Click refresh tab check weather the list has your updated table,then click finish and save the new columns automatically added.

Most of time it works well,sometimes it may not work properly for that cases just delete the table from entity from work,then again add the table as new table now you can access the new columns too.


这篇关于如何更新实体framewokr 6.1代码首先更新DataBase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆