这个是在EF迁移的时候报错:
解决方案:
修改你的MyDbcontext:
代码如下:
public class StoreDbContexttFactory : IDesignTimeDbContextFactory< ‘你的类名’> { public ‘你的类名’CreateDbContext(string[] args) { var optionsBuilder = new DbContextOptionsBuilder< ‘你的类名’>(); optionsBuilder.UseSqlServer("server=.;uid=sa;pwd=123456;database=Ceshi123123"); return new ‘你的类名’(optionsBuilder.Options); } }
然后再次迁移:
ok成功!
标签:different,EF,object,XXXXXXX,supported,报错,optionsBuilder,类名 From: https://www.cnblogs.com/syjtiramisu/p/17823657.html