Reputation: 1394
I am trying to get the current ApiController from the filterContext. It exposes a controller property but the ApiController implements some httpcontroller interface and is not there.
public override void OnActionExecuting(ActionExecutingContext filterContext)
Upvotes: 1
Views: 674
Reputation: 141588
You would cast it back to your ApiController. Something like this:
var apiController = filterContext.Controller as ApiController;
if (apiController != null)
{
//Do something with apiController.
}
Upvotes: 2