コード例 #1
0
        public static List <Sample.Business.SalesPerson> MapFromSalesPersonCollection(this ReverseMapper mapper, IEnumerable <SalesPerson> source)
        {
            List <Sample.Business.SalesPerson> result = new List <Sample.Business.SalesPerson>();

            foreach (var item in source)
            {
                result.Add(mapper.MapFromSalesPerson(item));
            }
            return(result);
        }
コード例 #2
0
 public static Sample.Business.SalesPerson MapFromSalesPerson(this ReverseMapper mapper, SalesPerson source)
 {
     if (source == null)
     {
         return(null);
     }
     else
     {
         return(mapper.MapFromSalesPerson(source, null));
     }
 }
コード例 #3
0
 public static Sample.Business.Employee MapFromEmployee(this ReverseMapper mapper, Employee source)
 {
     if (source == null)
     {
         return(null);
     }
     else if (source is SalesPerson)
     {
         return(mapper.MapFromSalesPerson((SalesPerson)source, null));
     }
     else
     {
         return(mapper.MapFromEmployee(source, null));
     }
 }