示例#1
0
        public IActionResult Post([FromBody] ArticleModel article)
        {
            Article obj = new Article();

            if (article.Id > 0)
            {
                _articleRepository.FindById(article.Id);
            }
            article.GetEntity(obj);
            obj = _articleRepository.Save(article.GetEntity(obj));
            return(Ok(obj));
        }