/// <summary> /// Does not throw /// /// The operation cannot be completed because the DbContext has been disposed. /// As unlike the above code sample a live DbContext is still available. /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void GetProductsIQueryableWithoutExceptionButton_Click(object sender, EventArgs e) { var ops = new DeferredExecution(); List <Product> results = ops.GetProductsIQueryable2() .ToList(); }