If I have the following classes:
public MainModel
{
public List<ChildModel> Children {get; set;}
}
public ChildModel
{
public bool IsDifferent {get; set;}
}
public MainDto
{
public List<ChildDto> Children {get; set;}
public List<DifferentChildDto> Different {get; set;}
}
public ChildDto
{ }
public DifferentChildDto
{ }
Using AutoMapper, is it possible to split and map the ChildModel list into 2 separate lists based on the property?
The end result shoud be that items with IsDifferent property set will be in the Different list whilst the remaining items are in the Children list.
The mapping should also work in reverse, ie. Merge the two DTO lists into the 1 model list.