Indicates if the controller should handle disposal of the UnitOfWork instance as part of the
ResultExecuted handler. By default this is enabled.
Namespace:
Mindscape.LightSpeed.Web.MvcAssembly: Mindscape.LightSpeed.Web (in Mindscape.LightSpeed.Web.dll)
Version: 4.0.1000.1 (4.0.0.0)
Syntax
Remarks
If you do not use DisposeUnitOfWorkOnResultExecuted you must write your own disposal
logic for the UnitOfWorkScope for example as part of Global.asax hooking the EndRequest event.
An example of this would be:
protected void Application_Start(object sender, EventArgs e)
{
EndRequest += new EventHandler(OnEndRequest);
}
void OnEndRequest(object sender, EventArgs e)
{
var scope = new PerRequestUnitOfWorkScope[TUnitOfWork](LightSpeedContext);
if (scope.HasCurrent)
{
scope.Current.Dispose();
}
}