Esempio n. 1
0
        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,
            });
        }
Esempio n. 2
0
 public IActionResult Create([FromBody] CreateCategoryParam param)
 {
     _articleApplicationService.CreateCategory(param);
     return(Json(new { code = 0 }));
 }