Seed method not called, Entity Framework 6

前端 未结 7 793
我在风中等你
我在风中等你 2020-12-28 18:29

I have a DatabaseInitializer class

public class DatabaseInitializer : CreateDatabaseIfNotExists
{
    protected override          


        
7条回答
  •  攒了一身酷
    2020-12-28 18:56

    This can happen if your Update-Database command does not run successfully, and this does not necessarily mean that it errors out. There might be changes that EF recognizes as "outstanding" that need to be added to a migration.

    Try calling "Add-Migration {migrationNameHere}" and then try "Update-Database" again.

提交回复
热议问题