// returns index page in Views and waits for func to get cake of the week public async Task <IActionResult> Index() { return(View(new HomeViewModel { CakeOfTheWeek = await _cakeRepository.GetCakesOfTheWeek() })); }
public async Task <IActionResult> Index() { var images = await _galleryRepository.GetSelectedImages(); return(View(new HomeViewModel { CakeOfTheWeek = await _cakeRepository.GetCakesOfTheWeek(), Images = images })); }