title: Web API Action Filter - Controller.TempData equivalent?
body: <p>In my System.Web.Mvc Action filters I previously used TempData to store an instance of my unitOfWork service like so:</p>
  
  <pre><code>public override void OnActionExecuting(ActionExecutingContext filterContext)
  {
      filterContext.Controller.TempData[UnitOfWorkRequestKey] = UnitOfWork;
      UnitOfWork.Begin();
  }
  </code></pre>
  
  <p>then to commit the transaction I retreived it from temp data like this..</p>
  
  <pre><code>public override void OnActionExecuted(ActionExecutedContext filterContext)
  {
      var unitOfWork = (IUnitOfWork)filterContext.Controller.TempData[UnitOfWorkRequestKey];
      try
      {
          if (filterContext.Exception == null)
          {
              unitOfWork.Complete();
          }
      }
      finally
      {
          unitOfWork.Dispose();
          filterContext.Controller.TempData[UnitOfWorkRequestKey] = null;
      }
  }
  </code></pre>
  
  <p>So my question is:<br>
  In the <code>System.Web.Http</code> Web Api Action Filter (using <code>HttpActionContext</code>) - is there an equivalent location to store my instance of a service, so I can retrieve the same instance when the action has executed?</p>