Application-wide action filters in ASP.NET MVC (blog.maartenballiauw.be)
published 7 months, 16 days ago, submitted by
maartenba(5585) 7 months, 16 days ago
Ever had a team of developers using your ASP.NET MVC framework? Chances are you have implemented some action filters (i.e. for logging) which should be applied on all controllers in the application. Two ways to do this: kindly ask your developers to add a [Logging] attribute to the controllers they write, or kindly ask to inherit from SomeCustomControllerWithActionsInPlace.
If you have been in this situation, monday mornings, afternoons, tuesdays and other weekdays are in fact days where some developers will forget to do one of the above. This means no logging! Or any other action filters that are executed due to a developer that has not been fed with enough coffee… Wouldn’t it be nice to have a central repository where you can register application-wide action filters? That’s exactly what we are going to do in this blog post.
|
category: MVC
|
Views: 227
tags:
ASPNETMVC MVC another
Everyones tags:
Your Tags: