public static PaymentModel FromDomainModel(Payment model) { if (model == null) return null; return new PaymentModel() { ID = model.ID, TicketID = model.TicketID, OrderID = model.OrderID, Date = String.Format("{0:dd/MM/yyyy}", (new DateTime(1970, 1, 1, 0, 0, 0, 0)).AddSeconds(model.Date)), Amount = model.Amount, Destination = model.Destination, PaymentStatus = model.PaymentStatus }; }
public static PaymentModel FromDomainModel(Payment payment) { if (payment == null) return null; return new PaymentModel() { TicketID = payment.TicketID, PaymentStatus = payment.PaymentStatus, OrderID = payment.OrderID, ID = payment.ID, Destination = payment.Destination, Date = String.Format("{0:dd/MM/yyyy}", (new DateTime(1970, 1, 1, 0, 0, 0, 0)).AddSeconds(payment.Date)), CustomerID = payment.CustomerID, Amount = payment.Amount ///TODO }; }