Entity Framework 6.1.1 disable model compatibility checking

前端 未结 3 1614
一生所求
一生所求 2020-12-24 13:59

I am running into the following error after updating EF to version 6.1.1:

An unhandled exception of type \'System.InvalidOperationException\' occurred

3条回答
  •  隐瞒了意图╮
    2020-12-24 14:39

    To expand on Dabblernl's answers:

    public ApplicationDbContext()
            : base("DefaultConnection", throwIfV1Schema: false)
        {
            Database.SetInitializer(null);
        }
    

提交回复
热议问题