public IActionResult DeleteRisk(string rid) { Guid id = Guid.Parse(rid); try { _riskService.Delete(id); return(Ok()); } catch (AppException ex) { // return error message if there was an exception return(BadRequest(new { message = ex.Message })); } }
public async Task <IActionResult> Delete(int id) { await _riskService.Delete(id); return(Ok()); }