public override void OnActionExecuted(ActionExecutedContext filterContext)
 {
     if (filterContext.IsChildAction)
     {
         return;
     }
     DocumentStoreHolder.TryComplete(filterContext.Controller, filterContext.Exception == null);
 }
 public override void OnActionExecuting(ActionExecutingContext filterContext)
 {
     if (filterContext.IsChildAction)
     {
         DocumentStoreHolder.TrySetSession(filterContext.Controller, (IDocumentSession)filterContext.HttpContext.Items[this]);
         return;
     }
     filterContext.HttpContext.Items[this] = DocumentStoreHolder.TryAddSession(filterContext.Controller);
 }