Skip to content

HOW TO : First mapping in Visual Studio

camous edited this page May 27, 2018 · 5 revisions
  1. Add ACMEMAPPER nuget package to your Visual Studio project

  1. Create a subfolder called Maps & create a new myobjecttype.json file

  1. Copy Paste following mapping definition into myobjecttype.json
{
    "$version" : "1.0",
    "myobjecttype" : [
        {
            "systemA" : {
                "property" : "systemAfield1"
            },
            "systemB" : {
                "property" : "systemBfield1"
            }
        },
        {
            "systemA" : {
                "property" : "systemAfield2"
            },
            "systemB" : {
                "property" : "systemBfield2"
            }
        }
    ]
}
  1. in your source code, instantiate Mapper with source system systemA and destination system systemB

  1. map an input JObject with 2 property systemAfield1 & systemAfield2
{
   "systemAfield1" : "mystringvalue1",
   "systemAfield2" : "mystringvalue2"
}
  1. checkout the result 🥇

Clone this wiki locally