Articles : Page 1 of 1

  • Dependency Injection in MVC 3–with Views

    Dependency Injection in MVC 3–with Views

    Jan 11
    24

    If you have not read the first post in this series, please do so as these samples build on that post. At first, it may appear that MVC 3s Dependency Injection is not all that different than what we had in MVC 1 and 2. The fact is, MVC 3 gives us a lot more flexibility, and for sure, Dependency Injection is a first class citizen in the ASP MVC Framework. Using the Unity IoC Container, lets take a look at how views can take advantage of Dependency Injection. View Page Class public class ...


  • Dependency Injection with ASP MVC 3–Distilled and Simplified

    Dependency Injection with ASP MVC 3–Distilled and Simplified

    Jan 11
    24

    One of the key new features in the ASP MVC 3 framework is how the framework interacts with your Inversion of Control (IoC) Container. Note: the specific behavior of the IoC containers themselves has not changed. The only thing that has changed is how the MVC 3 framework interacts with the IoC Container. In MVC 1 and 2, we had to create our own Custom Controller Factory. In MVC 3, your still free to do so. However, when you see how MVC 3 generically works with IoC containers, when upgrading t...



  • 1