Everything i tryed had absolutely no effect and i cant figure out why.
I have tryed following approaches:
changing the edmx xml:
Code: Select all
<EntityContainer Name="MyEntitiesContext" annotation:LazyLoadingEnabled="false">
Code: Select all
public MyEntitiesContext() : base("name=MyEntitiesContext", "MyEntitiesContext")
{
this.ContextOptions.LazyLoadingEnabled = false;
OnContextCreated();
}
Code: Select all
context.Configuration.ProxyCreationEnabled = false;
context.Configuration.LazyLoadingEnabled = false;
Code: Select all
public static void Register(HttpConfiguration config){
config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
}
The only possible way is to delete the navigation properties in my edmx model (database first) but thats not a solution because of course i want to use my entites without manually combining them.
Any solution?
I´m using .net 4.6, Ef6, the newest dotconnect and database first. (i'm creating a dll with the context in one project and use it in my web application)