.NET ProviderBase Template

The .NET ProviderBase was installed in version 2.0 of the .NET Framework. Have there been any new features since that enhance or improve this template, which should be used as an alternative?

+4
source share
1 answer

The provider template definitely had its day, but these days the dependency injection infrastructure has become so powerful and easy to use that they are the best option.

Disadvantages that I discovered when using the provider template:

  • it was very tedious to write code for the necessary configuration classes.

  • I had to manage a lot of painful and redundant configurations.

  • discovered that you should limit your ProviderBase inheritance class.

If you need to stick with Microsoft stuff, then Unity can work. There are many other DI frameworks, such as Structuremap or Ninject, which have a much simpler way of connecting dependencies.

+2
source

Source: https://habr.com/ru/post/1302625/


All Articles