My question is very similar to this one: How do I map an OData query against a DTO to an EF entity? I have a simple setup to test the ASP.NET Web API OData V4 $filter functi
Patrick, you can fill a destinationvalue from a calculated sourceValue, like:
Mapper.CreateMap()
.ForMember(dest => dest.InvoiceCount, opt =>
opt.MapFrom(src => src.Invoices.Count()));
I got this Example from: http://codethug.com/2015/02/13/web-api-deep-dive-dto-transformations-and-automapper-part-5-of-6/
Arturo, you can use reverseMap on the CreateMap if it is not a complex mapping, to do a one-liner.