本文介绍了实体框架6.1.1禁止模式的兼容性检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Additional information: The model backing the TvstContext
context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).
We could fix this in the past as described in this question:Where is modelBuilder.IncludeMetadataInDatabase in EF CTP5?
However, I can't seem to get rid of the error.
解决方案
This should work, put it somewhere in the constructor of your derived DbContext:
Database.SetInitializer<MyContext>(null);
这篇关于实体框架6.1.1禁止模式的兼容性检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!