public bool Follow(ApplicationUser user) { if (Followees.Any(F => F.FolloweeID == user.Id)) { return(false); } Followees.Add(new Following(this, user)); return(true); }
//Checks if this user is following another one public bool IsFollowing(string anotherUserId) { return(Followees.Any(f => f.FollowerId == Id && f.FolloweeId == anotherUserId)); }
//It is better to have this in a repository. public bool IsFollowing(string artistId) { return(Followees.Any(f => f.FolloweeId == artistId)); }