5

I found that the mapping is a case sensitive mapping from IDataReader which is a bummer as the database fields are all lower case and the POCOs are CamelCase.

I found this post by Jimmy, Is AutoMapper case sensitive or insensitive?...

Is there a magic switch somewhere?

Community
  • 1
  • 1
Kumar
  • 10,997
  • 13
  • 84
  • 134

2 Answers2

1

It's not possible out of the box

Kumar
  • 10,997
  • 13
  • 84
  • 134
-1

I think you can control this in Mapper.Initialize as the answer and solutions posted here seem to suggest: AutoMapper: Mapping between a IDataReader and DTO object

Here is another good post with examples on naming convention mappings: http://blog.ac-graphic.net/automapping-c-objects-from-one-naming-convention-to-an-other/

Does that help?

Community
  • 1
  • 1
shanabus
  • 12,989
  • 6
  • 52
  • 78
  • both are for naming conventions, lowercase, Pascal etc but not case insensitive per se ! will look into it more, thanks ! – Kumar Feb 15 '12 at 18:12
  • downloaded the src code and doesn,t look like its possible as is in the datareadermapper.cs atleast! not sure what jimmy meant by - it's case insensitive by default in the trunk !! – Kumar Feb 15 '12 at 18:30