Ignore mapping one property with Automapper

From Jimmy Bogard: CreateMap<Foo, Bar>().ForMember(x => x.Blarg, opt => opt.Ignore());

It’s in one of the comments at his blog.

UPDATE(from Jamie’s comment Jan 4 ’19 at 11:11:)

Ignore has been replaced with DoNotValidate in ForSourceMember:
https://github.com/AutoMapper/AutoMapper/blob/master/docs/8.0-Upgrade-Guide.md

Leave a Comment