public IActionResult ArticleCategoryEdit(string name, string content) { if (!string.IsNullOrEmpty(name)) { CategoryDto categoryDto = new CategoryDto(); categoryDto.Name = name; categoryDto.Describe = content; categoryDto.Status = "发布"; categoryDto.UpdateTime = DateTime.Now.ToString(); _articleCategoryService.AddCategory(categoryDto); return(Content("OK")); } else { return(View()); } }
/// <summary> /// 添加一条Article分类信息 /// </summary> /// <param name="categoryDto"></param> /// <returns></returns> public string AddArticleCategory(CategoryDto categoryDto) { categoryDto.UpdateTime = DateTime.Now.ToString(); _articleCategoryService.AddCategory(categoryDto); return(JsonHelper.toLayuiMsg("ok")); }