public async Task <IActionResult> Delete(Guid id) { var competition = competitionServis.GetCompetitionByIdAsync(id).Result; if (competition == null) { return(BadRequest()); } await competitionServis.DeleteCompetitionAsync(competition); if (!await competitionServis.SaveChanges()) { return(StatusCode(500, "Fault while saving...")); } return(NoContent()); }