예제 #1
0
 // 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()
     }));
 }
예제 #2
0
        public async Task <IActionResult> Index()
        {
            var images = await _galleryRepository.GetSelectedImages();

            return(View(new HomeViewModel
            {
                CakeOfTheWeek = await _cakeRepository.GetCakesOfTheWeek(),
                Images = images
            }));
        }