public static CheeseToppingDTO MapToDTO(CheeseToppingDAO topping)
        {
            var ct = new CheeseToppingDTO();

            ct.Id     = topping.Id;
            ct.Pizza  = PizzaMapper.MapToDTO(topping.Pizza);
            ct.Cheese = CheeseMapper.MapToDTO(topping.Cheese);
            ct.Active = topping.Active;

            return(ct);
        }
示例#2
0
        public static PizzaDTO MapToDTO(PizzaDAO pizza)
        {
            var p = new PizzaDTO();

            p.Id       = pizza.Id;
            p.Size     = SizeMapper.MapToDTO(pizza.Size);
            p.Crust    = CrustMapper.MapToDTO(pizza.Crust);
            p.Sauce    = SauceMapper.MapToDTO(pizza.Sauce);
            p.Cheese   = CheeseMapper.MapToDTO(pizza.Cheese);
            p.Quantity = pizza.Quantity;
            p.Active   = pizza.Active;

            return(p);
        }