Hi
I struggle with AutoMapper and a list of wrappers. I have an client/server solution where on the server side the object looks like this.
public class Trainer{
public List<Team> Teams{get;set;}
...
}
public Class Team{...}
On the Client side I have my own Collection, TSCollection and the classes looks like this.
public class Team{...}
public Class ItemWrapper<T>{
public T Item{get;set;}
...
}
public class Trainer{
public TSCollection<ItemWrapper<Team>> Teams{get;set;}
...
}
Thats a lite simple model, but my problem is how to convert from the List that comes from the server to a TSCollection on my client side. I have tried some ways with ITypeConverter-interface and some with the .ForMember() metod, but I can't figure it out how to make the conversion with AutoMapper.
Simple List to TSCollection conversion I solved with the ITypeConvert-interface, but this one where there needs to be a conversion inside the conversion I can't figure out.
Hoping for help!