public override void OnActionExecuting(HttpActionContext actionContext) { var unitOfWork = new UnitOfWork(sessionFactory); int hashCode = actionContext.GetHashCode(); requestToUnitOfWorkDictionary.Add(new KeyValuePair <int, IUnitOfWork>(hashCode, unitOfWork)); Context.SetUnitOfWork(unitOfWork); //var filter in actionContext.ActionDescriptor.GetCustomAttributes<Transactional>(false)) }