-
Notifications
You must be signed in to change notification settings - Fork 3
Quickstart
Isaac Abraham edited this page Jan 26, 2016
·
8 revisions
The Unity Automapper has a very simple API surface. To automatically map the types in your project: -
- Download the nuget package for Unity Automapper.
Install-Package Lydian.Unity.Automapper
- Add a single using statement and call the
AutomapAssemblies()
extension method on the container, providing the names of the assemblies to map.
using Lydian.Unity.Automapper;
var container = new UnityContainer();
container.AutomapAssemblies("MyFirstAssembly", "MySecondAssembly");
That's it! The automapper will interrogate those assemblies, find matching interface / concrete type implementations, wire them up and register them into Unity.