Beispiel #1
0
        public static PizzaOrder MapToPizzaOrder(PizzaOrderDAO pizzaOrder)
        {
            var po = new PizzaOrder();

            po.OrderID       = pizzaOrder.Id;
            po.CustomerID    = CustomerMapper.MapToCustomer(pizzaOrder.Customer).CustomerID;
            po.StoreID       = StoreMapper.MapToStore(pizzaOrder.Store).StoreID;
            po.PaymentTypeID = PaymentTypeMapper.MapToPaymentType(pizzaOrder.Payment).PaymentTypeID;
            po.Active        = pizzaOrder.Active;

            return(po);
        }
Beispiel #2
0
        public static PizzaOrderDAO MapToPizzaOrderDAO(PizzaOrder pizzaOrder)
        {
            var po = new PizzaOrderDAO();

            po.Id       = pizzaOrder.OrderID;
            po.Customer = CustomerMapper.MapToCustomerDAO(pizzaOrder.Customer);
            po.Store    = StoreMapper.MapToStoreDAO(pizzaOrder.Store);
            po.Payment  = PaymentTypeMapper.MapToPaymentTypeDAO(pizzaOrder.PaymentType);
            po.Active   = pizzaOrder.Active;

            return(po);
        }