EF CodeFirst将表添加到数据库

时间:2017-05-04 20:59:57

标签: asp.net entity-framework ef-code-first

我已经从数据库中添加了数据库的数据库,从而获得了ASP.NET MVC应用程序。现在我需要在datebase中创建新表并在其他地方添加列。我已经在数据库上手动创建它,现在我的问题是如何在Visual Studio项目中更新数据库以显示并允许我使用我创建的表?我已经尝试删除所有类和连接字符串并再次添加数据库,但我有例外:

"This operation requires a connection to the 'master' database. Unable to create a connection to the 'master' database because the original database connection has been opened and credentials have been removed from the connection string. Supply an unopened connection."

另外有用的将是教程的信息/链接如何从Visual Studio添加表并将更改发送到数据库。 谢谢你的帮助。

0 个答案:

没有答案