Esempio n. 1
0
        //
        // GET: /Admin/Beer/
        public ActionResult Index()
        {
            var vm = new BeerIndexViewModel()
            {
                Beers =
                    _beerOrchestrator.GetBeers()
                    .Select(b => new SelectListItem()
                {
                    Text = b.Name, Value = b.Id
                })
                    .ToList(),
                Breweries =
                    _breweryOrchestrator.GetBreweries()
                    .Select(b => new SelectListItem()
                {
                    Text = b.Name, Value = b.Id
                })
                    .ToList()
            };

            return(View(vm));
        }
Esempio n. 2
0
 // GET api/<controller>
 public IEnumerable <Brewery> Get()
 {
     return(_breweryOrchestrator.GetBreweries());
 }
Esempio n. 3
0
        //
        // GET: /Admin/Brewery/
        public ActionResult Index()
        {
            var breweries = _breweryOrchestrator.GetBreweries().ToList();

            return(View(breweries));
        }