Unable to update database to match the current model because there are pending changes and automatic migration is disabled
问题 I, for the life of me, can't get rid of this error message. I have tried almost everything that I can. MyDBContext.cs public MyDBContext() : base("ConnStr_Dev") { } protected override void OnModelCreating(DbModelBuilder modelBuilder) { Database.SetInitializer(new MigrateDatabaseToLatestVersion<MyDBContext, DbMigrationsConfiguration<MyDBContext>>()); //Database.SetInitializer<MyDBContext>(null); base.OnModelCreating(modelBuilder); } GenericRepository.cs public void Insert(T obj) { table.Add