public async Task <IActionResult> DeleteTournament([FromRoute] int id)
        {
            try
            {
                await tournamentService.DeleteTournamentAsync(id);

                return(Accepted());
            }
            catch (NotFoundInDatabaseException)
            {
                return(NotFound());
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
예제 #2
0
 public async Task <IHttpActionResult> Delete(int id)
 {
     return(Json(await _tournamentService.DeleteTournamentAsync(id)));
 }