Automapper – Use IoC for creating Destinations

Automapper by default creates new instances of destination using the default contructor. If you need to ask the IoC to create the new instance, it actually turns out to be pretty simple. We will begin by setting up our Unity Container to register the IMapper. As you can see, you are also initializing the Automapper … Continue reading Automapper – Use IoC for creating Destinations

Mapping XML Using Automapper

Automapper comes handy when you have to deal with a lot of DTOs, making it very easy to map one type to another. But there are situations where you might need an extra hand. Consider the following Type definitions. The Source.Address is a XML representation of Address. Your requirement is to configure Automapper to convert … Continue reading Mapping XML Using Automapper