actionfilterattribute

Custom Validation in ASP.NET Web API with FluentValidation

Validation is one of the key components in any web app. After all, we should never trust any input to our applications, ever. Up until now, my group has been building MVC-based web apps, in those apps we've been content to use built-in or custom-built validation solutions for any validation-type procedures we needed to write. Now, though, we've transferred over to building a web service written in ASP.NET Web API, and the old validation structure we had in place... Read more >

What is the ActionFilterAttribute? - ASP.NET MVC Demystified

One of the ways MVC allows us to fine-tune what an action does is via the use of Action Filter attributes. Action Filters are attributes which inherit from the ActionFilterAttribute class, and can execute either before or after a decorated action (or before/after every action in a controller) and modify how the action is handled. In this post we'll explore creating a custom Action Filter by inheriting from ActionFilterAttribute. What is an ActionFilter? In ASP.NET, an "Action... Read more >