public async Task <Unit> Handle(AddStopwordCommand request, CancellationToken cancellationToken) { await _stopwordService.CreateStopword(new Models.Response.Stopword { Name = request.Stopword, Active = true }); return(Unit.Value); }
public IActionResult Post([FromBody] StopwordCreateViewModel model) { var stopword = new Stopword() { Id = Guid.NewGuid(), Title = model.Title, Content = model.Content }; var stopwords = _stopwordService.CreateStopword(stopword); return(Ok(stopwords)); }