async public Task <ActionResult> CreateMatch() { string userId = User.Identity.GetUserId(); GladiatorOpponentsViewModel model = new GladiatorOpponentsViewModel { Gladiators = await GladiatorHandler.GetCurrentGladiators(userId), Opponents = await GladiatorHandler.GetRandomOpponents() }; return(PartialView("_NewMatch", model)); }
async public Task <ActionResult> Index() { string userId = User.Identity.GetUserId(); GladiatorOpponentsViewModel model = new GladiatorOpponentsViewModel { Gladiators = await GladiatorHandler.GetCurrentGladiators(userId) }; if (User.IsInRole("Admin")) { model.Opponents = await GladiatorHandler.GetOpponents(userId); } return(PartialView(model)); }