In Part 4 we will see how we can use projection to map inner objects for example a DateTime field.

Again our domain and Dto (Data Transfer Object) looks like

We will map the PurchaseDate in the Domain Object to our Dto PurchaseHour and Purchase Minute.

As you can see the View now contains the flatten Hour and Minute, from our previous posting we also see that the other way of nested projection/flattening is by CustomerName.

Here is how our view would display

In part 5, I will show how to use CustomerResolver to resolve and map values to different types.

Previous Post:
Part 1 (NullSubsitution)
Part 2 (Flattening by Convention)
Part 3 (Nested Mapping)