示例#1
0
        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 }));
            }
        }
示例#2
0
        public async Task <IActionResult> Delete(int id)
        {
            await _riskService.Delete(id);

            return(Ok());
        }