mardi 9 juin 2015

ObjectContext is disposed, can not longer used

Example Code:

private static list;
public void SetList ()
var query = Container.Advices.Where ();
list= query.ToList();

public void doStuff ()
var temp= list.where (...).ToList ();

problem situation:

When i call the first time SetList, all worked fine. Now, a second is SetList called. I can see in the method, there are all objects, but in the second method doStuff is an exception thrown: ObjectContext is disposed ... I'm not understanding why. I saw the data is loaded correctly in the list and not a second later i can ' t load the navigation properties.

How can i fix this?

Aucun commentaire:

Enregistrer un commentaire