public IActionResult Delete(Page page)
 {
     if (_pageRepository.Delete(page))
     {
         return(Ok(new WebResponseModel()));
     }
     return(Ok(new WebResponseModel
     {
         error = true,
         errorMsg = $"system error!"
     }));
 }
예제 #2
0
        public IActionResult Remove(Resource resource)
        {
            var result = _resourceRepository.Delete(resource);

            if (result)
            {
                return(Ok(new WebResponseModel
                {
                    methodName = nameof(Remove)
                }));
            }
            return(Ok(new WebResponseModel()
            {
                error = true,
                errorMsg = $"system error!",
                methodName = nameof(Remove)
            }));
        }
예제 #3
0
 public IActionResult Delete(Template template)
 {
     return(Ok(_templateRepository.Delete(template) ? new WebResponseModel() : new WebResponseModel {
         error = true, errorMsg = $"系统异常"
     }));
 }