Exemplo n.º 1
0
        public ArticleViewModel AddArticle(AddArticleToAuthorInputModel input, string authorId)
        {
            var article = _mapper.Map <Article>(input);

            _authorRepository.AddArticle(authorId, article);
            article.Category = _categoryRepository.Find(input.CategoryId);
            return(_mapper.Map <ArticleViewModel>(article));
        }