本文介绍了ADO.Net Entity Framework的生成数据库从模型(错误的数据库显示)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是用ADO.net实体框架,当我右键单击我的模型设计,并选择生成数据库从型号我看剧本弹出,但错误的数据库名称。如何更改的数据库我的模型应与互动?我觉得我的解决方案可能会聊到错误的数据库!
I am using the ADO.net Entity Framework and when i right click in my model designer and select 'Generate Database From Model' I see the script pop up, but with the wrong database name. How can I change which database my Model should interact with? I feel my solution may be talking to the wrong database!
感谢。
推荐答案
检查的ConnectionString在web.config中或app.config中。这就是EF使用连接到数据库。
Check the connectionstring in web.config or app.config. That is what EF uses the connect to the DB.
这篇关于ADO.Net Entity Framework的生成数据库从模型(错误的数据库显示)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!