Skip to content

Instantly share code, notes, and snippets.

@brantb
Created November 19, 2013 16:31
Show Gist options
  • Save brantb/7548185 to your computer and use it in GitHub Desktop.
Save brantb/7548185 to your computer and use it in GitHub Desktop.
Well, that was not what I expected.
public class Source { public string Property { get; set; } }
public class Dest { public string Property { get; private set; } }
[Fact]
public void Wat()
{
Mapper.CreateMap<Source, Dest>();
var source = new Source {Property = "foo"};
var dest = Mapper.Map<Dest>(source);
Console.Out.Write(dest.Property); // "foo"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment