Exemple #1
0
        public async Task <IActionResult> OnGetAsync(int?id, [FromServices] UserManager <User> userManager)
        {
            User = await userManager.GetUserAsync(HttpContext.User);

            if (id == null)
            {
                return(NotFound());
            }

            CompetitionDto = _competitionService.GetCompetitions().Single(c => c.Id == id);
            Participations = _participationService.GetParticipationById(id).ToList();
            if (CompetitionDto == null)
            {
                return(NotFound());
            }
            return(Page());
        }