public static DAL.App.DTO.Payment MapFromBLL(BLL.App.DTO.Payment payment) { var res = payment == null ? null : new DAL.App.DTO.Payment { Id = payment.Id, BillId = payment.BillId, Bill = BillMapper.MapFromBLL(payment.Bill), PaymentMethodId = payment.PaymentMethodId, PaymentMethod = PaymentMethodMapper.MapFromBLL(payment.PaymentMethod), Sum = payment.Sum, PaymentTime = payment.PaymentTime }; return(res); }
public static BLL.App.DTO.BillLine MapFromDAL(DAL.App.DTO.BillLine billLine) { var res = billLine == null ? null : new BLL.App.DTO.BillLine { Id = billLine.Id, BillId = billLine.BillId, Bill = BillMapper.MapFromDAL(billLine.Bill), Product = billLine.Product, Amount = billLine.Amount, Sum = billLine.Sum, DiscountPercent = billLine.DiscountPercent, SumWithDiscount = billLine.SumWithDiscount }; return(res); }