Example #1
0
        public bool Follow(ApplicationUser user)
        {
            if (Followees.Any(F => F.FolloweeID == user.Id))
            {
                return(false);
            }

            Followees.Add(new Following(this, user));

            return(true);
        }
Example #2
0
 //Checks if this user is following another one
 public bool IsFollowing(string anotherUserId)
 {
     return(Followees.Any(f => f.FollowerId == Id && f.FolloweeId == anotherUserId));
 }
Example #3
0
 //It is better to have this in a repository.
 public bool IsFollowing(string artistId)
 {
     return(Followees.Any(f => f.FolloweeId == artistId));
 }