Beispiel #1
0
 public PizzaRepo(PizzaReservationContext pizzaReservation, ILogger <PizzaRepo> logger, ISizeRepo sizeRepo, IToppingRepo toppingRepo)
 {
     _pizzaReservation = pizzaReservation;
     _logger           = logger;
     _sizeRepo         = sizeRepo;
     _toppingRepo      = toppingRepo;
 }
 public PizzaController(IPizzaRepo pizzaRepo, IToppingRepo toppingRepo, ISizeRepo sizeRepo, ILogger <PizzaController> logger)
 {
     _pizzaRepo   = pizzaRepo;
     _toppingRepo = toppingRepo;
     _sizeRepo    = sizeRepo;
     _logger      = logger;
 }
Beispiel #3
0
        public PizzaVM(IPizzaRepo pizzaRepo, IToppingRepo toppingRepo, ISizeRepo sizeRepo, Pizza pizza)
        {
            Pizza = pizza;

            SelectedToppings = pizzaRepo.GetPizzaToppings(pizza.Name).Result;
            Toppings         = new MultiSelectList(toppingRepo.GetToppingsAsync().Result, "ToppingId", "Name", SelectedToppings);

            SelectedSizes = pizzaRepo.GetPizzaSizes(pizza.Name).Result;
            Sizes         = new MultiSelectList(sizeRepo.GetSizesAsync().Result, "SizeId", "Name", SelectedSizes);
        }
Beispiel #4
0
 public ToppingsController(IToppingRepo toppingsRepo, IMapper mapper, ILogger <ToppingsController> logger)
 {
     _toppingsRepo = toppingsRepo;
     _mapper       = mapper;
     _logger       = logger;
 }
 public ToppingController(IToppingRepo toppingRepo)
 {
     _toppingRepo = toppingRepo;
 }