Example #1
0
        //create a new target and map source on it
        public static TTarget Map <TSource, TTarget>(TSource source)
        {
            var target = (TTarget)Creator.Create(typeof(TTarget));

            return(MapperFactory.GetMapper <TSource, TTarget>().Map(source, target));
        }
Example #2
0
 //map source to an existing target
 public static TTarget Map <TSource, TTarget>(TSource source, TTarget target)
 {
     target = MapperFactory.GetMapper <TSource, TTarget>().Map(source, target);
     return(target);
 }