i want to map one type to other but i have multiple properties in the first type that is required to get one property of other type
for example
public class A
{
public int a{get;set;}
public int b{get;set;}
public int c{get;set}
}
public class B
{
public C z{get;set;}
public int c{get;set}
}
public class C
{
public int a{get;set;}
public int b{get;set;}
public int Total{get;set}
}
public class D
{
public C Get(A a)
{
var c = new C();
c.a = a.a;
c.b= b.a;
c.c = c.a + c.b;
return c
}
}
here I want to map A to B, so how can i do it using Automapper