public List <IWritableDate> GetCommentRevisions(Comment comment) { IQueryable <IWritableDate> query = RepositoryContext.Comments .Where(c => c.Id.Equals(comment.Id)); return(DataPresenter.GetSortedByWriteDate(query.ToList()).ToList()); }
public ICollection <IWritableDate> GetMessagesBetween(Account from, Account to) { IEnumerable <IWritableDate> query = RepositoryContext.Messages .Where(m => m.FromId.Equals(from.Id) && m.ToId.Equals(to.Id) || // the inverse discussion m.FromId.Equals(to.Id) && m.ToId.Equals(from.Id) ).ToList(); return(DataPresenter.GetSortedByWriteDate(query.ToList()).ToList()); }
public void AssignAllAnswers(Comment comment) { LoadCollection((c => c.Answers), comment); foreach (var answer in comment.Answers) { LoadReference(a => a.Account, answer); } comment.Answers = DataPresenter .GetSortedByWriteDate(comment.Answers) .ToList(); LoadCollection(c => c.Reactions, comment); }