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)); } }
public async Task <IHttpActionResult> Delete(int id) { return(Json(await _tournamentService.DeleteTournamentAsync(id))); }