public IEnumerable <Profile> GetFriendsOf(Guid id) { var friendShips = _friendShipRepository.GetAll(); var profiles = new List <Profile>(); foreach (var friendShip in friendShips) { if (friendShip.RequestedById == id) { profiles.Add(friendShip.RequestedTo); } if (friendShip.RequestedToId == id) { profiles.Add(friendShip.RequestedBy); } } return(profiles); }
public IEnumerable <FriendShip> GetAll() { return(_friendShipRepository.GetAll()); }