4

Is there a way to inject the Unity container into an attribute in ASP.NET MVC 2?

Sounds quite a bit of work...

ab_732
  • 3,349
  • 5
  • 39
  • 57
  • 1
    Related: http://stackoverflow.com/questions/7192543/injecting-dependencies-into-asp-net-mvc-3-action-filters-whats-wrong-with-this/7194467#7194467 – Mark Seemann Nov 18 '11 at 08:14

1 Answers1

2

If you mean attribute as action filters... Have a look here, there's an exemple : https://web.archive.org/web/20140110094543/http://www.esenciadev.com/2010/05/dependency-injected-action-filters-in-asp-net-mvc2/

Tomasz Jaskuλa
  • 15,393
  • 4
  • 44
  • 72
  • That URL now returns a 404 Page Not Found. Here is a snapshot of the page, courtesy of the Wayback Machine: https://web.archive.org/web/20140110094543/http://www.esenciadev.com/2010/05/dependency-injected-action-filters-in-asp-net-mvc2/ – Rami A. Oct 09 '17 at 23:04