// // GET: /Admin/Beer/Create public ActionResult Create(string breweryId) { var brewery = _breweryOrchestrator.GetById(breweryId); var styles = _styleOrchestrator.GetStyles(); if (null != brewery) { var vm = new CreateBeerViewModel(styles) { BreweryId = brewery.Id, BreweryName = brewery.Name }; return(View(vm)); } ModelState.AddModelError("Brewery", "Brewery with that id does not exist."); return(View(new CreateBeerViewModel() { BreweryId = breweryId })); }
// GET: Admin/Style public ActionResult Index() { var styles = _styleOrchestrator.GetStyles(); return(View(styles)); }