The purpose of this sample app is to present the intended use and setup of Mapr.
It consists of four parts:
- A
Domain
folder that contains the domain models - A
DataModels
folder that contains DTOs (Normally this would be in different project.) - A
Maps
folder that contains the maps for the models and DTOs - A
Program.cs
file that configures and uses theIMapper
.
The example domain object is a Person
class. It contains a couple of properties as well as a
value object Address
, which also contains some properties and another value object ZipCode
.
The Maps
folder contains the definitions for the mapping between the domain models and the
DTOs. Note that the IMapper
interface is injected into the mapper. This allows you to map
more complex objects such as Person
that in tern contains objects that need to be mapped.