-
Notifications
You must be signed in to change notification settings - Fork 3
Customising the automapper
Isaac Abraham edited this page Feb 11, 2014
·
22 revisions
The Unity Automapper works to what I believe are the most common requirements by default. These are: -
- Registrations use the transient lifetime manager i.e. every call to Unity to resolve a type will create a new instance of that type.
- Only one implementation of an interface is expected. If more are found, an exception is thrown.
- All interfaces that are found and have suitable concrete implementations will be added to the container.
- Registrations do not take part in Policy Injection.
There are times when you may want to do something different to the above on a case-by-case basis. There are two different mechanisms in which to customisations to the Automapper can take place: -
The following customisations exist: -