A quick object-object mapper for .NET
Available on nuget
PM> Install-Package TinyMapperTinyMapper.Bind();
var person = new Person
{
Id = Guid.NewGuid(),
FirstName = "John",
LastName = "Doe"
};
var personDto = TinyMapper.Map(person);Ignore mapping source members and bind members with different names/types
TinyMapper.Bind(config =>
{
config.Ignore(x => x.Id);
config.Ignore(x => x.Email);
config.Bind(source => source.LastName, target => target.Surname);
config.Bind(target => source.Emails, typeof(List));
});
var person = new Person
{
Id = Guid.NewGuid(),
FirstName = "John",
LastName = "Doe",
Emails = new List{"[email protected]", "[email protected]"}
};
var personDto = TinyMapper.Map(person);TinyMapper supports the following platforms:
A big thanks to all of TinyMapper's contributors:
No open issues yet, or sync has not completed.