Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 public static CreateOrderModel FromOrder(Order order)
 {
     var form = Mapper.Map<Order, CreateOrderModel>(order);
     return form;
 }
Exemplo n.º 3
0
 public void Create(Order order)
 {
     Uow.Orders.Add(order);
     Uow.Commit();
 }