public IActionResult AddFriend(PlayerFriendship playerFriendship) { try { Friendship friendship = new Friendship(); friendship.PlayerID = playerFriendship.PlayerID; friendship.FriendID = playerFriendship.FriendID; Players.AddFriendship(friendship); return(Ok(Players.FindOneByID(playerFriendship.PlayerID))); } catch (Exception error) { return(StatusCode(500)); } }