更新实体框架 [英] Update Entity Framework

查看:126
本文介绍了更新实体框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Entity Framework 5.0.0。我在我的数据库中添加表格。我在我的数据库中添加新表并使用从数据库更新模型进行更新,之后我发现了很多错误。



我想知道为什么会发生这种情况如何更新EF而不会出现任何错误。

I am using Entity Framework 5.0.0. I add table in my database for ex. i add new table in my database and use "Update Model from Database" to update and after that i got lot of error.

I want to know why this happen and how i can update EF without getting any error.

推荐答案

查看以下文章绝对初学者实体框架简介。这将有助于您获得基本的想法关于如何使用任何EF版本。



绝对初学者实体框架简介
Check below article of "An Introduction to Entity Framework for Absolute Beginners".That will help you for get basic idea about how to work with any EF version.

An Introduction to Entity Framework for Absolute Beginners


检查以下链接,使用DBFirst方法从DB更新模型。



http://msdn.microsoft。 com / zh-CN / data / jj206878.aspx [ ^ ]



希望这有助于
Check the below link for Update the Model from DB using DBFirst approach .

http://msdn.microsoft.com/en-us/data/jj206878.aspx[^]

Hope this helps


删除你的.edmx(授权模型)文件应用



并删除web.config文件中的连接字符串



then



生成新的实体模型。





我遇到同样的问题然后我按照上面的步骤..



i不知道为什么会这样,但尝试上面的步骤会对你有所帮助。
delete your .edmx(entitiy model) file in your application

and also remove connection string in web.config file

then

generate new entity model.


I have same problem occur then i have follow above step..

i don't know why this happen but try above step it will help you.


这篇关于更新实体框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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