public TransactionObject UnsendFriendRequest(int senderUserID, int receiverUserID) { TransactionObject response = new TransactionObject(); if ((frManager.CheckExistence(senderUserID, receiverUserID))) { try { User senderUser = userManager.GetUser(senderUserID); User receiverUser = userManager.GetUser(receiverUserID); FriendRequest fr= frManager.GetFriendRequestByUsernames(senderUserID, receiverUserID); ; senderUser.SentFriendRequests.Remove(fr); receiverUser.ReceivedFriendRequests.Remove(fr); frManager.DeleteRequest(fr); uow.Save(); } catch (Exception ex) { response.IsSuccess = false; response.Explanation = base.GetExceptionMessage(ex); } } else { response.IsSuccess = false; response.Explanation = "This friend request has not been sent before!"; } return response; }