C# AutoMapper Conditional Mapping based upon target value
问题 Please can any one advise how to use conditional mapping in AutoMapper to map a value in the TARGET object from a SOURCE object based upon an existing TARGET property value? So my source class is: public class UserDetails { public String Nickname { get; set; } } My target class is: public class ProfileViewModel { public Boolean NicknameIsVisible { get; set; public String Nickname { get; set; } } I want to set the "Nickname" property value in the TARGET to match the "Nickname" property value