private void CreateNameMapping(MapperConfig config) { var source = new MappingEntity { ObjectType = typeof(SourceObject).AssemblyQualifiedName, PropertyName = nameof(SourceObject.PropNo1) }; var target = new MappingEntity { ObjectType = typeof(TargetObject).AssemblyQualifiedName, PropertyName = nameof(TargetObject.Name) }; var nameMapping = new Mapping(source, target); config.Add(nameMapping); }
private void CreateBirthDateMapping(MapperConfig config) { var source = new MappingEntity { ObjectType = typeof(SourceObject).AssemblyQualifiedName, PropertyName = nameof(SourceObject.PropNo2) }; var target = new MappingEntity { ObjectType = typeof(TargetObject).AssemblyQualifiedName, PropertyName = nameof(TargetObject.BirthDate) }; var nameMapping = new Mapping(source, target) { ConversionFormat = "yyyyMMdd" }; config.Add(nameMapping); }
private void CreateCommentMapping(MapperConfig config) { var source = new MappingEntity { ObjectType = typeof(SourceObject).AssemblyQualifiedName, PropertyName = nameof(SourceObject.PropNo3) }; var target = new MappingEntity { ObjectType = typeof(TargetObject).AssemblyQualifiedName, PropertyName = nameof(TargetObject.Comment) }; var nameMapping = new Mapping(source, target) { ConversionFormat = "Comment:=$VALUE$" }; config.Add(nameMapping); }