Jon Erickson
Jon Erickson

Reputation: 114886

Is AutoMapper case sensitive or insensitive?

If object a has a property named 'Id' and object b has a property named 'ID', will AutoMapper correctly map the two properties (without doing a .ForMember(...) call)?

Upvotes: 22

Views: 11044

Answers (2)

Jimmy Bogard
Jimmy Bogard

Reputation: 26765

The trunk version is now default case-insensitive, and supports multiple naming conventions (camelCase, lowercase_underscore, etc). Look for this in the next version of AutoMapper, which should drop in a couple of days.

Upvotes: 30

kay.one
kay.one

Reputation: 7692

No, last time I tried it (month or so ago) it was case sensitive.

Upvotes: 3

Related Questions