AutoMapper Ignore the rest?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
In AutoMapper, “ignore the rest” usually means “map only the members I care about and do not fail on every other unmatched property.” The important detail is that modern AutoMapper does not have a magic one-line feature that automatically ignores every unspecified member at runtime the way many old blog posts suggest.
What People Usually Mean by “Ignore the Rest”
There are two separate concerns:
- Runtime mapping behavior.
- Configuration validation.
By default, AutoMapper tries to match destination members by name. If a destination property has no source match, configuration validation can fail. That is why older answers often point to custom extensions such as IgnoreAllNonExisting. Those patterns came from older APIs and are not the current recommendation.
Today, the clean choices are:
- Ignore individual destination members with
ForMember(..., opt => opt.Ignore()). - Change validation behavior with
MemberList.SourceorMemberList.None. - Build smaller DTOs so you do not need to ignore half the object graph.
Ignoring Specific Members
If only a few destination members should be skipped, be explicit:
This is usually the best option because the intent is obvious in code review.
Relaxing Validation for the Whole Map
Sometimes the issue is not the mapping itself. The real problem is configuration validation complaining about members you do not care about for that map. In those cases, define the map with a different member list:
MemberList.Source tells AutoMapper to validate against source members instead of destination members. MemberList.None disables validation for that map entirely.
That is often closer to what people mean by “ignore the rest,” especially when the destination type has members filled later by other code.
When to Avoid the Pattern Entirely
If a DTO has twenty properties and you only want three, that is usually not an AutoMapper problem. It is a design problem. Create a smaller destination type:
This removes the need to ignore unrelated fields and makes the API easier to understand.
A Useful Mental Model
Think of AutoMapper as a tool for predictable object projection, not as a way to avoid thinking about model shape. The more selective your mapping becomes, the more valuable explicit configuration becomes as well.
That is why current AutoMapper guidance leans toward:
- explicit
Ignore - explicit
MapFrom - deliberate validation settings
rather than a broad “ignore everything else” extension.
Common Pitfalls
The most common mistake is copying an old Stack Overflow extension that targets outdated AutoMapper internals. Those snippets often break on newer versions or solve only validation, not runtime mapping.
Another mistake is confusing “do not validate this member” with “never write to this member.” Validation configuration and runtime mapping are related, but they are not the same thing.
Developers also overuse MemberList.None. It is convenient, but it removes a useful safety net. If a property rename silently breaks a map, validation would have caught it.
Finally, if you keep ignoring most of a destination type, the destination type is probably too large for the use case.
Summary
- Modern AutoMapper does not have a single built-in “ignore the rest” switch for all mapping behavior.
- Use
ForMember(..., opt => opt.Ignore())for individual destination members. - Use
MemberList.SourceorMemberList.Nonewhen the real issue is configuration validation. - Prefer smaller DTOs over large destination types with many ignored members.
- Be cautious with old
IgnoreAllNonExistingpatterns from outdated examples.

