コード例 #1
0
        public async Task <IActionResult> Delete(int id)
        {
            var result = new ResponseResult();

            if (await _functionService.CountAsync <FunctionDto>(i => i.ParentId == id) > 0)
            {
                result.Message = nameof(BusinessCode.Record_Cascade_Exist);
                result.Code    = BusinessCode.Record_Cascade_Exist;
            }
            else
            {
                await _functionService.Delete(id);
            }


            return(Ok(result));
        }