What does UseDestinationValue do?
I am asking because I have a base and inherited class, and for the base class, I would love to have AutoMapper take existing values for me.
Will it do that? (I have looked and the only examples I can see for UseDestinationValue
involve lists. Is it only for lists?
could I do this:
PersonContract personContract = new PersonContract {Name = 'Dan'};
Person person = new Person {Name = "Bob"};
Mapper.CreateMap<PersonContract, Person>()
.ForMember(x=>x.Name, opt=>opt.UseDestinationValue());
person = Mapper.Map<PersonContract, Person>(personContract);
Console.WriteLine(person.Name);
and have the output be bob?