Web API - Action Filters
Been looking at action filters which can be applied as declarative attributes on a controller or even across the whole app. This could be used for cross cutting concerns such as logging and auditing.
[ServiceFilter(typeof(MyLogger))]
Where MyLogger need to implement
IAsyncActionFilter
and have been registered as a service in StartUp
[ServiceFilter(typeof(MyLogger))]
Where MyLogger need to implement
IAsyncActionFilter
and have been registered as a service in StartUp
Comments
Post a Comment