我跟随 (在linux上并转换为F#)成功创建了迁移( Migrations目录中的3个文件)。但是dotnet ef database update说一切都是最新的,dotnet ef migrations list说没有发现移民。当我手动检查创建的sqlite文件时,它只包含一个空的__EFMigrationsHistory表。context.Database.Migrate()和context.Database.EnsureCreated()方法也不会进行任何迁移
我在Asp.net Mvc内核中有三层应用程序,使用EF核心,现在我想要创建自动迁移, public class AdminContext : DbContextcontext.Database.EnsureCreated())当我运行应用程序数据库并生成表时,__migrationhistorycontext.Database.EnsureCreated())
创建了