I am trying to use AutoMapper to map Microsoft.ServiceBus.Messaging.BrokeredMessage to a lightweight DTO. I have the following code:
Mapper.CreateMap<BrokeredMessage, QueueMessage>()
.ForMember(dest=>dest.ID, src=>src.MapFrom(x=>x.SequenceNumber));
But this is producing an exception:
An exception of type 'System.ArgumentException' occurred in System.Core.dll but was not handled in user code. Additional information: Method T GetBodyT is a generic method definition
Would be grateful for any suggestions.