public async Task <IActionResult> Delete(int id) { // successful DELETE returns 204 No Content with empty body if (await _scoreRepository.GetScoreById(id) is L_Score score) { await _scoreRepository.DeleteScoreById(score.ScoreId); return(NoContent()); } return(NotFound()); }