private FreeOfChargeDiscountDTO Map(tblFreeOfChargeDiscount tbl)
 {
     var dto = new FreeOfChargeDiscountDTO
     {
         MasterId = tbl.id,
         DateCreated = tbl.IM_DateCreated,
         DateLastUpdated = tbl.IM_DateLastUpdated,
         StatusId = tbl.IM_Status,
         ProductRefMasterId = tbl.ProductRef,
         isChecked = tbl.IsChecked,
         StartDate = tbl.StartDate,
         EndDate = tbl.EndDate
     };
     return dto;
 }
示例#2
0
 public FreeOfChargeDiscount Map(FreeOfChargeDiscountDTO dto)
 {
     if (dto == null) return null;
     var freeOfChargeDiscount = Mapper.Map<FreeOfChargeDiscountDTO, FreeOfChargeDiscount>(dto);
     freeOfChargeDiscount.ProductRef = new ProductRef {ProductId = dto.ProductRefMasterId};
     return freeOfChargeDiscount;
 }