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.Mvc
Assembly:  Mindscape.LightSpeed.Web (in Mindscape.LightSpeed.Web.dll)
Version: 4.0.1000.1 (4.0.0.0)

Syntax

C#
public bool DisposeUnitOfWorkOnResultExecuted { get; set; }
Visual Basic (Declaration)
Public Property DisposeUnitOfWorkOnResultExecuted As Boolean

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(); } }

See Also