How to uses the GetCurrentAuditScope() (or another) method in an ActionFilterAtribbute on MVC and WebAPI to get the AuditScope.
I need recover that on OnActionExecuted(HttpActionExecutedContext actionExecutedContext) event.
Or have another thing which i can uses?
Yes, you can use the GetCurrentAuditScope()
Extension Method on HttpContext
, for example:
using Audit.WebApi;
// ...
public override void OnActionExecuted(ActionExecutedContext context)
{
var scope = context.HttpContext.GetCurrentAuditScope();
// ...
}