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); } }
public New Add(New news) { return(_newRepository.Add(news)); }
public void Add(News entity) { _newRepository.Add(entity); }