private void friendshipInit(Entities.Citizen citizen, IFriendService friendService, Entities.Citizen currentCitizen) { if (currentCitizen != null && currentCitizen.ID != citizen.ID) { AreFriends = friendService.AreFriends(currentCitizen, citizen); HasSentFriendRequest = friendService.HasSentFriendRequest(currentCitizen, citizen); HasReceivedFriendRequest = friendService.HasSentFriendRequest(citizen, currentCitizen); if (HasReceivedFriendRequest) { var friendRepo = DependencyResolver.Current.GetService <IFriendRepository>(); friendRequestID = friendRepo.GetFriendRequest(citizen.ID, currentCitizen.ID).ID; } CanAddFriend = !AreFriends && !HasSentFriendRequest && !HasReceivedFriendRequest; } }