O'Reilly logo
  • Ryan Garrett thinks this is interesting:

  • Dependency chain resolution: If you request a component that has its own dependencies (e.g., constructor parameters), the container will satisfy those dependencies, too. So, if the constructor for the MyEmailSender class requires an implementation of the INetworkTransport interface, the DI container will instantiate the default implementation of that interface, pass it to the constructor of MyEmailSender and return the result as the default implementation of IEmailSender.
  • Object lifecycle management: If you request a compo...
  • From

    Cover of Pro ASP.NET MVC 5, Fifth Edition


    Benefits of a container for dependency injection. One of the biggest IMO is the instance control