public void AddNewNews(News NewNews) { NewNews.Date = DateTime.Now; CurrentNewsWebsiteRepository.AddNews(NewNews); CurrentNewsWebsiteRepository.SaveAllChangesMadeInsideCollections(); }
public Comment(News CurrentNews, User CurrentUser, string CommentBody) { News = CurrentNews; Author = CurrentUser; Message = CommentBody; Date = DateTime.Now; }
public IEnumerable<Comment> GetAllCommentsForNews(News SelectedNews) { List<Comment> ListOfComments; ListOfComments = CurrentNewsWebsiteRepository.AllComments.Where(CurrentComment => CurrentComment.News == SelectedNews).ToList(); return ListOfComments; }
public void AddNews(News NewNews) { News.Add(NewNews); }