Thursday 27 May 2010

Object Mapping Solutions

Imagine you have 2 sets of classes which have to be translated and mapped to each other (Source and Target):

Approach 1: Hard coding each mapping in Translator classes. One translator in each target class.

Approach 2: Using reflection to map the properties
This can be used only if the properties are exactly the same

Approach 3:
Using AutoMapper from CodePlex.

No comments: