0
public MyEntities()
: base("name=MyEntities")
{
/*
* If DbContext.Configuration.ProxyCreationEnabled is set to false,
* DbContext will not load child objects for some parent object unless Include method is called on parent object.
* Reference: https://stackoverflow.com/questions/4596371/what-are-the-downsides-to-turning-off-proxycreationenabled-for-ctp5-of-ef-code-f
*/
this.Configuration.ProxyCreationEnabled = false;
}
我修改了MyDataModel.Context.cs文件。我提到this Link。实体框架修改Context.cs文件更改不会持续
问题我每次更改edmx文件(删除表或从数据库添加新表)时,都会重新构建该文件。所以我做的这个改变就会丢失。
我该如何保留这个改变?有没有这样的配置设置?