我的 Migrations/Configuration.cs 中有一个 Seed 方法:
protected override void Seed(MVC4App.Models.MVC4Entities context)
{
try
{
// Initialize database for Account
WebSecurity.InitializeDatabaseConnection(
"MVC4Entities", "Users", "UserId", "Email", autoCreateTables: true);
如果我尝试在我的开发机器上运行“update-database -verbose”,我会收到以下错误:
The "WebSecurity.InitializeDatabaseConnection" method can be called only once.
这是我的代码中唯一调用它的地方。我怎样才能解决这个问题?
谢谢