The following exception thrown during mapping collection of DTOs to the collection of Models: A first chance exception of type 'System.TypeLoadException' occurred in mscorlib.dll Additional information: Method 'GetEnumerator' in type IEnumerable is not implemented. The structure is as follows:
class UnauthorizedItemsDto { InspectableItemDto[] PeerToPeerApplications { get; set; } } public interface IUnauthorizedItems { IEnumerable<IInspectableItem> PeerToPeerApplications { get; } }
class UnauthorizedItems : IUnauthorizedItems
{
private RangeObservableCollection<IInspectableItem> _peerToPeerApplications;
private RangeObservableCollection<IInspectableItem> PeerToPeerApplicationsImpl
{
get
{
return _peerToPeerApplications ??
(_peerToPeerApplications = new RangeObservableCollection<IInspectableItem>());
}
}
public IEnumerable<IInspectableItem> PeerToPeerApplications
{
get { return PeerToPeerApplicationsImpl; }
}
}
All relevant mappings for single items are added inside the mapping profile