I would appreciate your inputs on accomplishing the mapping for the given scenario.
class Section1
{
public string S1 { get; set; }
public string S2 { get; set; }
public string S3 { get; set; }
}
class Section2
{
public string S4 { get; set; }
public string S5 { get; set; }
}
class Section3
{
public string S6 { get; set; }
public string S7 { get; set; }
}
class SectionsInfo
{
public Section1 A { get; set; }
public Section2 B { get; set; }
public Section3 C { get; set; }
}
class SectionsTogetherInStraight
{
public string S1 { get; set; }
public string S2 { get; set; }
public string S3 { get; set; }
public string S4 { get; set; }
public string S5 { get; set; }
public string S6 { get; set; }
public string S7 { get; set; }
}
I have an object for class SectionsInfo and would like to configure AutoMapper for SectionsTogetherInStraight. Thanks in advance
MapFromorConstructUsingmethods to flatten the object. More about it here