Unity is customizable

Is it possible to configure the Unity Dependency embedding infrastructure for a solution by agreement. In other words, if I have an ICustomerRepository, when he tries to solve it, he will first see if there are any registered types, and if not, then by agreement, try and resolve the CustomerRepository class.

This will save a lot of repetitive code.

+5
source share
3 answers

Unity 3 now supports registration by agreement. For more information and examples, see this .

+2
source

Thomas Pedersen built the Unity Configuration API for the standard Unity configuration.

You can get a NuGet package or source .

0
source

All Articles