I've been trying to use AutoMapper, but I'am having trouble configuring the map.
Having this:
public class A
{
public B b { get; set; }
public C c { get; set; }
public int id { get; set; }
public string X { get; set; }
}
public class B
{
public int id { get; set; }
public string Y { get; set; }
}
public class C
{
public int id { get; set; }
public string Z { get; set; }
}
public class ABC
{
public int Aid { get; set; }
public string AX { get; set; }
public int Bid { get; set; }
public string BY { get; set; }
public int Cid { get; set; }
public string CZ { get; set; }
}
How can I do mapping A > ABC and ABC > A.
I don't want to map each property manually. Is it possible?
Thank you.