Пример #1
0
        public ActionResult Create(CreateKegViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return View(model);
            }

            var id = _kegOrchestrator.CreateKeg(model.BeerId, model.Capacity);
            return RedirectToAction("Details", new {id = id});
        }
Пример #2
0
        public ActionResult Create()
        {
            var vm = new CreateKegViewModel(_beerOrchestrator.GetBeers());

            return View(vm);
        }
Пример #3
0
        public ActionResult Create()
        {
            var vm = new CreateKegViewModel(_beerOrchestrator.GetBeers().OrderBy(i => i.Name).ToList());

            return View(vm);
        }