public void AcceptFriend(int friendRequestId) { var friendRequestManager = new FriendRequestManager(); var friendProfileManager = new FriendProfileManager(); var friendRequest = friendRequestManager.AcceptFriendRequest(friendRequestId); friendProfileManager.Add(new FriendRelationshiop() { UserProfileId = friendRequest.UserProfileId, FriendUserProfileId = friendRequest.FriendUserProfileId }); friendProfileManager.Add(new FriendRelationshiop() { UserProfileId = friendRequest.FriendUserProfileId, FriendUserProfileId = friendRequest.UserProfileId, }); }
public void AcceptFriend(long friendRequestId) { var friendRequestManager = new FriendRequestManager(); var friendProfileManager = new FriendProfileManager(); var friendRequest = friendRequestManager.AcceptFriendRequest(friendRequestId); friendProfileManager.Add(new FriendProfile() { ProfileId = friendRequest.ProfileId, FriendProfileId = friendRequest.FriendRequestProfileId, IsFavourite = false }); friendProfileManager.Add(new FriendProfile() { ProfileId = friendRequest.FriendRequestProfileId, FriendProfileId = friendRequest.ProfileId, IsFavourite = false }); }
public int AcceptFriendRequest(int friendRequestId) { Console.WriteLine("Accepting..."); return(_repo.AcceptFriendRequest(friendRequestId)); }