public Order ToOrder() { var order = new Order { Id = Guid.NewGuid(), CreatedDate = DateTime.Now, ClientId = ClientId.GetValueOrDefault(), City = this.City, Address = this.Address, PhoneNumber = this.PhoneNumber, Dozens = this.Dozens.GetValueOrDefault(), IsDeleted = false, OrderStatusId = OrderStatus.PENDING }; return order; }
public static CreateOrderModel FromOrder(Order order) { var form = Mapper.Map<Order, CreateOrderModel>(order); return form; }
public void Create(Order order) { Uow.Orders.Add(order); Uow.Commit(); }