Emit Mapper is a .NET library for mapping entities, such as objects, DataReaders or SQL commands.
Emit Mapper is an open source library written in C# to map entities to each other. It can be used to fill DTOs, DataRows or Data Access Layer entities.
Emit Mapper is hosted on CodePlex.
Example
A basic example (C#)
public class A {
string ID { get; set; }
int Value { get; set; }
}
public class B {
string ID { get; set; }
string Value { get; set; }
}
var mapper = ObjectMapperManager.DefaultInstance.GetMapper<A, B>();
B b = mapper.Map(new A { ID = "UniqueKey", Value = 8280 });
Assert.AreEqual(a.ID, b.ID);
Assert.AreEqual(Convert.ToString(a.Value), b.Value);