Tag Archives: ActionFilterAttribute

ASP.NET Core Action Arguments Validation using an ActionFilter

This article shows how to use an ActionFilter to validate the model from a HTTP POST request in an ASP.NET Core MVC application. Code: https://github.com/damienbod/AngularAutoSaveCommands 2018-11-22: Updated to Angular 7.1.0, nuget packages 2018-09-28: Updated to ASP.NET Core 2.1.4 and Angular 6.1.9 2018-06-16: Updated to ASP.NET Core 2.1 and Angular 6.0.5 2018-02-11: Updated to ASP.NET Core […]

ASP.NET Core 2.0 Action Filters

This article shows how the ActionFilterAttribute class can be used in an ASP.NET Core 2.0 MVC application. The ActionFilterAttribute class is an implementation of the IActionFilter, IAsyncActionFilter, IResultFilter, IAsyncResultFilter, and the IOrderedFilter interfaces. This filter can be used as a method filter, controller filter, or global filter for all MVC HTTP requests, or more precisely […]

Web API 2 Using ActionFilterAttribute, OverrideActionFiltersAttribute and IoC Injection

ActionFilters are a great way to add extra functionality to your Web API service. This article shows examples of how the ActionFilters work together, how the filters can be overrided and how the filters can be used together with an IoC. The diagram underneath shows how the filters are called in the Web API lifecycle. […]

AOP with ASP.NET Web Api

This blog demonstrates the usage of filters and unity interface interception with an ASP.NET Web Api application. AOP = Aspect oriented programming. This programming paradigm can be used to add functionality to existing methods. In the following example, we wrap the controller method with diagnosis using filters and then we wrap the business manager with […]