public static BLL.App.DTO.Payment MapFromDAL(DAL.App.DTO.Payment payment) { var res = payment == null ? null : new BLL.App.DTO.Payment { Id = payment.Id, BillId = payment.BillId, Bill = BillMapper.MapFromDAL(payment.Bill), PaymentMethodId = payment.PaymentMethodId, PaymentMethod = PaymentMethodMapper.MapFromDAL(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); }