I'm having issues mapping below source and destination classes.
public class Source
{
public InnerSourceListExtendedClass InnerSourceListExtended {get;set;}
}
public class InnerSourceListExtended : List<InnerSource>
{
}
public class InnerSource{
public string prop1 {get;set;}
public string prop1 {get;set;}
}
public class Destination
{
public List<InnerDestination> InnerDestination {get;set;}
}
public class InnerDestination
{
public string prop1 {get;set;}
public string prop1 {get;set;}
}
My current mapping configuration is
CreateMap<Source, Destination>()
ForMember(dest => dest.InnerDestination , opts => opts.MapFrom(src =>
src.InnerSourceListExtended));
Not able to map using above mapping configuration, it is throwing an exception " Error mapping types.\r\n\r\nMapping types:\Source -> Destination."
Any help would be appreciated.