public async Task <IActionResult> Index() { ViewData["Title"] = "Home page"; var prizes = await _prizes.GetPrizes(); var model = new HomeModel() { Prizes = prizes .GroupBy(_categorizationService.GetCategory, new CategoryComparer()) .OrderByDescending(g => g.Key.Order), }; return(View(model)); }
public async Task <IActionResult> GetAllPrizes() { var prizes = await _prizes.GetPrizes(); return(Ok(prizes)); }