I'd like to merge two objects using AutoMapper (see test below). I've tried a bunch of things but it always copies both properties from the target or the source.
How can I pass the Test below?
public class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
[Test]
public void Merge_people()
{
var source = new Person() { LastName = "Smith" };
var target = new Person() { FirstName = "John" };
Mapper.CreateMap<Person, Person>();
Mapper.Map(source, target);
Assert.That(target.FirstName == "John");
Assert.That(target.LastName == "Smith");
}