public async Task <JsonResult> Add(AddArticleDto model) { var result = await _articleAppService.Add(model); OutputModel outputModel = new OutputModel(); outputModel.Data = result; return(new JsonResult(outputModel)); }
public ActionResult <ArticleDto> Post([FromBody] ArticleCreateDto dto) { var article = _app.Add(dto); return(CreatedAtAction(nameof(Get), new { id = article.Id }, article)); }
public IActionResult Add(AddArticleDto dto) { var list = _articleAppService.Add(dto); return(RedirectToAction("Index")); }
public ArticleDto Add([FromBody] AddArticleDto dto) { return(_articleAppService.Add(dto)); }