I have a source and destination object like so:
Source:
public class Team{
public string TeamName{get; set;}
public string List<Person> {get; set;}
}
public class Person{
public string FullName {get; set;}
}
Destination:
public class MyDTOClass{
public string TeamName;
public string PersonName;
}
I basically want to flatten a one-to-many relationship, duplicating the Name property, so the result would be:
MyDtoClass.TeamName= "X";
MyDtoClass.PersonName= "Y";
MyDtoClass.TeamName= "X";
MyDtoClass.PersonName= "Z";
Is there a way to do this with automapper?