Friday, October 21, 2016

Dependency Injection with ASP.NET Web Forms

Most developers have used Dependency Injection with ASP.NET MVC and ASP.NET Web API, but it has typically been difficult to set up Dependency Injection with an IoC (Inversion of Control) container.

Well, now Microsoft is offering guidance on how to set up Dependency Injection with an IoC container such as AutoFac for use within your ASP.NET Web Forms applications: https://blogs.msdn.microsoft.com/webdev/2016/10/19/modern-asp-net-web-forms-development-dependency-injection/

While using Dependency Injection in an ASP.NET Web Forms does not remove all of the problems typically associated with developing ASP.NET Web Forms applications, but it does go a long way to reduce the code dependencies found in Code Behind files and makes the overall code base that much cleaner!

No comments:

Post a Comment