public async Task <IActionResult> DeleteConfirmed(int id) { var roundDisplayModel = await _roundService.LoadDisplayModel(id); if (roundDisplayModel == null) { return(NotFound()); } await _roundModelStatePopulator.ValidateAndPopulateForDelete(ModelState, roundDisplayModel.DataModel); if (ModelState.IsValid) { await _roundService.DeleteRound(id); return(RedirectToAction(nameof(Index), new { id = roundDisplayModel.Season })); } return(View(roundDisplayModel)); }
public async Task DeleteRoundById([FromRoute] Guid id) { await _roundService.DeleteRound(id); Response.StatusCode = (int)HttpStatusCode.NoContent; }