Adding Dependency Injection (Autofac) to ASP.NET MVC Core 2 10. December 2017 BillKrat IOC, ASP.NET MVC (0) Where the built-in Inversion Of Control (IOC), aka Dependency Injection (DI), container of ASP.NET MVC will meet most needs, sometimes we’ll want to utilize more advanced features of alternate IOC containers. In the example below we are configuring for the use of Autofac (line 56), using a pat... [More]
ASP.NET MVC / REST Web API / Unity IOC 27. February 2016 BillKrat MVC, IOC, REST (0) Source code available on GitHub => https://github.com/BillKrat/Framework “Dependency Injection has become a first class citizen”, I heard this in a video I was watching on ASP.NET MVC 5 and judging by the latest release it is very impressive indeed; Microsoft nailed it with ASP.NET MVC I’ve... [More]
ASP.NET MVC4 - Setting up Dependency Injection (Unity) Revised 16. September 2015 BillKrat MVC4, IOC (0) Back in 2011 I wrote an article after studying Brad Wilson’s article on controllers; I based my UnityControllerFactory on his work; the controller factory is how you hook an IOC container into MVC 4. It is possible that since 2011 there are newer/improved ways of doing this, but I opted ... [More]