コード例 #1
0
        //[Authorize(Roles = "Admin")]
        public ActionResult <string> AddClassification(Classification classification)
        {
            log.Info("添加的分类为" + classification.ClassificationName);
            string classificationName = classification.ClassificationName;

            if (classificationName != null)
            {
                string result = _managementService.AddClassification(classification);
                return(Ok(result));
            }
            return(NotFound("添加的分类名为空"));
        }