I would like to map all properties from datetime unspecified kind to UTC kind by just adding kind to datetime for mappings for all properties for Automapper 8.0, i found some maybe working solutions, but they are for older versions of Automapper that use ResolveUsing instead of MapFrom(). How to achieve that?
cfg.ForAllPropertyMaps(map => map.TypeMap.SourceType is IDbType && (map.SourceType == typeof(DateTime?) || map.SourceType == typeof(DateTime)), (map, expression) => { expression.ResolveUsing(o => { return #DO_WHATEVER_YOU_NEED# }); });
I want to map only all entities and Datetimes from server-> client to have Utc Kind added, above code is from github.com/AutoMapper/AutoMapper/issues/1650