I have a rather large object with lots of properties.
I am using Automapper to map to the properties from a grid.
Only a few of the properties need to be mapped and the rest have to be ignored as they are used later not at the time of mapping
Is there a way to ‘Ignore’ all of these properties or do I need to write an explicit ‘Ignore’ for every property – see code below. I’d like to be able to ‘.IgnoreAllNotUsed’ instead of having to ignore one by one. Is this possible?
The class inherits from another class but most of the properties are on the actual class itself
link to picture of code


You can use this extension method:
Use it like this:
I haven’t tested it but it should work.