コード例 #1
0
        public IActionResult Delete(int id)
        {
            var model = _flowRepository.GetFlow(id);

            if (model == null)
            {
                return(NotFound());
            }

            _flowRepository.DeleteFlow(model);
            if (!_flowRepository.save())
            {
                return(StatusCode(500, "删除出错!"));
            }
            _mailService.send("flow delete", $"id为{id}的产品被干掉了!");
            return(Ok());
        }