Пример #1
0
        public void Create(RegisterArticleDTO articleDTO)
        {
            var article = new Article();

            if (articleDTO != null)
            {
                article.Text             = articleDTO.Text;
                article.ImageUrl         = articleDTO.ImageUrl;
                article.Header           = articleDTO.Header;
                article.ShortDescription = articleDTO.ShortDescription;
                article.PublishDate      = DateTime.Now;
                article.UserId           = articleDTO.UserId;
                _newRepository.Add(article);
            }
        }
Пример #2
0
 public New Add(New news)
 {
     return(_newRepository.Add(news));
 }
Пример #3
0
 public void Add(News entity)
 {
     _newRepository.Add(entity);
 }