public static internalDTO.Payment MapFromExternal(externalDTO.Payment payment) { var res = payment == null ? null : new internalDTO.Payment { Id = payment.Id, BillId = payment.BillId, Bill = BillMapper.MapFromExternal(payment.Bill), PaymentMethodId = payment.PaymentMethodId, PaymentMethod = PaymentMethodMapper.MapFromExternal(payment.PaymentMethod), Sum = payment.Sum, PaymentTime = payment.PaymentTime }; return(res); }
public static internalDTO.BillLine MapFromExternal(externalDTO.BillLine billLine) { var res = billLine == null ? null : new internalDTO.BillLine { Id = billLine.Id, BillId = billLine.BillId, Bill = BillMapper.MapFromExternal(billLine.Bill), Product = billLine.Product, Amount = billLine.Amount, Sum = billLine.Sum, DiscountPercent = billLine.DiscountPercent, SumWithDiscount = billLine.SumWithDiscount }; return(res); }