我们有一个MVC 4项目,并使用Structure Map作为IoC框架。当我们对使用DbContext的服务类进行异步调用时,它会引发异常:
Value cannot be null.
Parameter name: httpContext
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: httpContext
一旦抛出这个:
The operation cannot be completed because the DbContext has been disposed.
我该如何纠正?