Exemplo n.º 1
0
        public async Task <IActionResult> Index()
        {
            var vm = new BarAndCoctailInListViewModel();

            vm.ListOfBars      = (await barServices.GetMostPopular(3)).Select(b => b.MapToViewModel()).ToList();
            vm.ListOfCocktails = (await cocktailServices.GetMostPopular(4)).Select(c => c.MapToViewModel()).ToList();
            return(View(vm));
        }