I was interested in any framework/patterns to leverage to generate an object to object Mapping tool. My goal is to use EF to hydrate the object, and I would like to use a custom class which would define the transformation between ObjectA –> ObjectB (Similar to AutoMapper, Biztalk map yet in .net). I would think this would be a common scenario and would like to leverage any best practices/frameworks any one has used in the past. Any help is greatly appreciated!
I was interested in any framework/patterns to leverage to generate an object to object
Share
You should have a look at this tool : Automapper Verbatim. It’s not the same as the Automappper you’d find on Codeplex. Unlike the one on Codeplex, Automapper Verbatim will generate code rather than using reflection (it’s much more faster).
Updates/Bug fixes seem to be posted on a regular basis.
We use this tool on several projects and it saves us a lot of time.
Some piece of advice though: do not hesitate to split your mapper in different .map files (for performance and readability reasons), putting them in the same directory will let you re-use mapping done from one file to another. Splitting .map files will avoid you merge issues as well (if you work in a team). Be sure to always get the latest version of .map file you’ll need to work on, unless merging will become a nightmare 🙂