Example #1
0
 public void Initialize()
 {
     mappingConfiguration.CreateMapping <IgnoreTestSource, Destination>(s => new Destination
     {
         Data2      = MappingOptions.Ignore(),
         Data4      = MappingOptions.Ignore(),
         Data5      = s.Data3 > 0.5 ? s.Data5 : MappingOptions.Ignore(),
         Data7      = MappingOptions.Ignore(),
         EighthData = MappingOptions.Ignore()
     });
 }
 public void Initialize()
 {
     mappingConfiguration.CreateMapping <IdenticalTestSource, Destination>(s => new Destination());
 }
Example #3
0
 /// <summary>
 /// Create mapping from <see cref="TSource"/> to <see cref="TDestination"/> without any configurations
 /// </summary>
 /// <typeparam name="TSource">Original model</typeparam>
 /// <typeparam name="TDestination">Result model</typeparam>
 /// <param name="mappingConfiguration"></param>
 public static void CreateMapping <TSource, TDestination>(this IMappingConfiguration mappingConfiguration) where TDestination : new()
 {
     mappingConfiguration.CreateMapping <TSource, TDestination>(s => new TDestination());
 }