Ejemplo n.º 1
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            var tournament = await _tournamentService.DetailsTournament(id);

            await _tournamentService.Delete(tournament);

            return(RedirectToAction(nameof(Index)));
        }
        public async Task <ActionResult> DeleteTournament(Guid id)
        {
            Tournament tournament = await _tournamentService.GetByIdAsync(id);

            if (!await _tournamentService.TournamentExistsAsync(id))
            {
                return(NotFound());
            }

            await _tournamentService.Delete(id);

            return(NoContent());
        }