tags:

views:

11

answers:

0

I have a Linq to Sql source being mapped to a DTO.

The src contains a property which does not exist in the DTO. I.e. src.State exists but dest.State does not exist.

This causes the Mapping Configuration to throw a ConfigurationException.

I don't want to add the property to the DTO (e.g. dest.State) to make it work and the .ForMember() method requires either a dest property or a string name which I think is related to the dest property.

How can I tell the automapper to Ignore() the src property when the dest property does not exist?

related questions