예제 #1
0
 public void AddNewNews(News NewNews)
 {
     NewNews.Date = DateTime.Now;
     CurrentNewsWebsiteRepository.AddNews(NewNews);
     CurrentNewsWebsiteRepository.SaveAllChangesMadeInsideCollections();
     
 }
예제 #2
0
파일: Comment.cs 프로젝트: Saroko-dnd/My_DZ
 public Comment(News CurrentNews, User CurrentUser, string CommentBody)
 {
     News = CurrentNews;
     Author = CurrentUser;
     Message = CommentBody;
     Date = DateTime.Now;
 }
예제 #3
0
 public IEnumerable<Comment> GetAllCommentsForNews(News SelectedNews)
 {
     List<Comment> ListOfComments;
     ListOfComments = CurrentNewsWebsiteRepository.AllComments.Where(CurrentComment => CurrentComment.News == SelectedNews).ToList();
     return ListOfComments;
 }
예제 #4
0
 public void AddNews(News NewNews)
 {
     News.Add(NewNews);
 }