Implement a custom value mapping set
In the data synchronization process, a value mapping set controls the mapping of data from the source object to the target object. Normally, you configure the data mapping by assigning individual value mappings to the value mapping set. However, if the data mapping logic is very complex, you can control the data mapping through code instead. To do so, you must create a custom value mapping set that implements the code that determines the data mapping.
The code example in this topic implements the following data mapping logic:
-
Read the Name property from the source object.
-
Write it to the Description property on the target object.
-
Set the current date on the LastUpdated property on the target object.
To create the custom value mapping set:
-
In Visual Studio, add the following class: