Beispiel #1
0
        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));
        }
Beispiel #2
0
 async public Task <ActionResult> Opponents()
 {
     return(PartialView(await GladiatorHandler.GetOpponents()));
 }