I have a scenario like
If total number of days is less than 30 days, then I have to set Salary to null
this.CreateMap<Foo, Doo>()
.ForMember(dst => dst.Salary, opt => {
opt.Condition(src => src.JoinedDate.Days <= 30));
opt.MapFrom(null)
}
But I am facing error "cannot find member of type Foo. Parameter name: name". but don't have any property "name".
Question is How to pass null value to destination property in condition check, and retain existing value if days greater than 30.
opt.MapFrom(null)