AutoMapper: map entities to a destination with a suffix

111 views Asked by At

Given the following example:

class Source:
int Id;
DateTimeOffSet StartDate;
DateTimeOffSet EndDate;
...

class Destination:
int Id;
DateTimeOffSet StartDate;
DateTimeOffSet StartDateUtc;
DateTimeOffSet EndDate;
DateTimeOffSet EndDateUtc;
...

How can I map both ways all source properties of type DateTimeOffSet of all my objects from/to their destination properties with the -Utc suffix? (the destination property without the suffix should stay unmapped)

0

There are 0 answers