4

For a mapping between TypeA and TypeB i would like all the boolean properties to be mapped to 'Yes' or 'No'. I don't want to override the <bool, string> mapping since i want that just for the mapping between TypeA and TypeB. And I would not like to use .ForMember for each TypeA's boolean property since they are a lot. Maybe there is a trick with ForAllMembers but I cannot make it works.

Julien
  • 833
  • 8
  • 20

1 Answers1

1

have you tried adding a mapper between Bool and String and registering it in the engine? It may be that simple, but I don't remember.

you could also create a ValueConverter and then inform the mappings to use the converter. It's been awhile since i used AM, but this sounds about right.

Jason Meckley
  • 7,589
  • 1
  • 24
  • 45