public void CreateCategory(CreateCategoryParam param) { var category = new ArticleCategory(GuidHelper.GenerateComb().ToString(), param.Name, 0); _articleCategoryDomainService.Create(category); _integrationEventBus.PublishEvent(new NewCreatedCategoryEvent() { Id = category.Id, Name = category.Name, }); }
public IActionResult Create([FromBody] CreateCategoryParam param) { _articleApplicationService.CreateCategory(param); return(Json(new { code = 0 })); }