Relative Content

Tag Archive for c#automapper

How to ignore a source property in AutoMapper

Let’s say you have a mapping between a DTO and an entity. Let’s say that the DTO contains some property that you do not want to be mapped to the entity. How can I tell Automapper to not map this property? I know that you can tell Automapper to not map a destination property. However, that will not help me, as I want to tell Automapper to not map a source property. Here is an example: