public async Task <IActionResult> Delete(int id) { var projectToDelete = await _riskRepository.GetAsync(id).ConfigureAwait(false); if (projectToDelete == null) { return(NotFound()); } await _riskRepository.DeleteAsyn(projectToDelete).ConfigureAwait(false); return(new NoContentResult()); }