Esempio n. 1
0
        public IEnumerable <Ribbit> GetTimelineFor(int userId)
        {
            // retrieve the authors followers
            // if any of them have the id of supplied the user id
            // the ribbits of the people that the user (of the supllied id) follows
            // OR
            // get the ribbits for this user

            return(_ribbits.FindAll(r => r.Author.Followers.Any(f => f.Id == userId) || r.AuthorId == userId)
                   .OrderByDescending(r => r.DateCreated));
        }
Esempio n. 2
0
 public IEnumerable <Ribbit> GetTimelineFor(int userId)
 {
     return(_ribbits.FindAll(r => r.Author.Followers.Any(f => f.Id == userId) || r.AuthorId == userId)
            .OrderByDescending(r => r.DateCreated));
 }