Windsor dependency injection in ASP.NET MVC filter attributes

added by leniel
6/6/2012 8:54:09 AM

5 Kicks, 248 Views

I learn so much each day that I don’t have time to post about every interesting thing I discover. Generally I get to these discoveries/solutions to overcome a wall that somehow appears while developing a given functionality. I use Castle Windsor as my Inversion of Control [ IoC ] container. Recently I’ve been implementing some features that depend heavily on ASP.NET MVC action filter attributes and at some point I needed to get a reference to a service that hits the database for some data checking rules. Unfortunately one cannot ask a Windsor container to give back a dependency when inside an attribute because...


0 comments