Tuesday, June 11, 2019

.Condition in AutoMapper seems to both specify the field to map from while also denoting a condition for whether to map at all versus leaving the field-to-be null.

This had this example:

.ForMember(dest => dest.ItemQuantity, act => act.Condition(src => (src.Quantity > 0)))

No comments:

Post a Comment