Ejemplo n.º 1
0
 public static OrderModel Mapper(OrderEntity oe)
 {
     if (oe != null)
     {
         OrderModel om = new OrderModel
         {
             CreateDate   = oe.CreateDate,
             Discount     = oe.Discount,
             FriendlyCode = oe.FriendlyCode,
             Id           = oe.Id,
             SubTotal     = oe.SubTotal,
             Total        = oe.Total,
             Buyer        = UserMapper.Mapper(oe.Buyer),
             Seller       = UserMapper.Mapper(oe.Seller),
             Address      = AddressMapper.Mapper(oe.Address),
             Payment      = PaymentMapper.Mapper(oe.Payment)
         };
         return(om);
     }
     return(null);
 }