Beispiel #1
0
 public void Follow(UserProfile otherUser) => FollowedUsers.Add(new UserFollower(otherUser, this));
Beispiel #2
0
        public void Unfollow(UserProfile otherUser)
        {
            var followedUser = FollowedUsers.Single(f => f.UserId == otherUser.Id);

            FollowedUsers.Remove(followedUser);
        }
Beispiel #3
0
 public bool HasFollowed(UserProfile otherUser) => FollowedUsers.Any(f => f.UserId == otherUser.Id);