public async Task <IActionResult> Create(ArticleCategoryModel model) { var category = new ArticleCategoryModifyRequest { Description = model.Description, ParentId = model.ParentId, Name = model.Name, UpdatedById = LoggedUserId, CreatedById = LoggedUserId }; var exist = await _articleCategoryService.FindByNameAsync(model.Name); if (exist != null) { return(RedirectToErrorPage()); } category.UpdatedById = LoggedUserId; category.CreatedById = LoggedUserId; var id = await _articleCategoryService.CreateAsync(category); return(RedirectToAction(nameof(Detail), new { id })); }