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文件(刪除表或從數據庫添加新表)時,都會重新構建該文件。所以我做的這個改變就會丟失。
我該如何保留這個改變?有沒有這樣的配置設置?