Creating WPF app with Entity Framework 6. I have a view model with a list of categories and a list of items (in selected category). When selectedCategory changes, I'm using the following method to fill a list of items:

```
CurrentList = new ObservableCollection<T>(Context.Set<T>().Where(p => p.IsGroup == false).Where(m => m.ParentId == _currentCategory.Id));

```

I'm mot showing different error handling etc. So I open a form, select categories, and everything works perfect. If to close and open the same form a few times, then I get an exception: "The operation cannot be completed because the DbContext has been disposed".
Sometimes I get it after 2nd open, sometimes - after 3rd or 4th access to the same form.
Context is disposed when form closes.

What I do wrong and why this exception raises not regularly and never on the first opening?

------UPD 1------
Ok, I'm showing you more code but I'm sure the problem is in that row.

Form creation:

```
Context = new Entities();
Context.Set<T>().Load();
LoadCurrentList();

```

LoadCurrentList():

```
if ((CurrentCategory == null) || (CurrentCategory.Id == 0))
{
    CurrentList = new ObservableCollection<T>(Context.Set<T>().Local.Where(p => p.IsGroup == false).Where(m => m.Parent == null));
}
else
{
    CurrentList = new ObservableCollection<T>(Context.Set<T>().Local.Where(p => p.IsGroup == false).Where(m => m.ParentId == CurrentCategory.Id));
}

```

Form closing command:

```
Context.Dispose();

```

CurrentCategory property set method raises LoadCurrentList() method

That's all! Adding ToList() or using query to database (not to local) doesn't help. The only solve I've found is to create internal List variable, read table on form creation, and than make requests to this internal variable, not to DBContext.

Do these additions make any sense?