private void ChangeABadge() { ViewAllBadges(); Console.WriteLine("Enter the ID of the badge you want to update."); string oldBadgeID = Console.ReadLine(); int oldBadgeIDAsInt = int.Parse(oldBadgeID); Badges newBadge = new Badges(); Console.WriteLine("What would you like to do?\n\n" + "1. Remove A Door\n" + "2. Add A Door"); string userInput = Console.ReadLine(); if (userInput == "1") { Console.Clear(); Console.WriteLine("Removing Doors"); bool wasRemoved = _badgesRepo.RemoveADoor(oldBadgeIDAsInt); if (wasRemoved) { Console.WriteLine("Doors were removed"); } else { Console.WriteLine("Doors have remained"); } } else if (userInput == "2") { Console.Clear(); Console.WriteLine("Enter the doors you would like this Badge to have access to:"); newBadge.AccessibleDoors = Console.ReadLine(); Console.WriteLine("Any other doors? (y/n)"); string additionalDoor = Console.ReadLine().ToLower(); _badgesRepo.AddABadge(newBadge); while (additionalDoor == "y") { Console.WriteLine("Enter the doors you would like this Badge to have access to:"); newBadge.AccessibleDoors = Console.ReadLine(); Console.WriteLine("Any other doors? (y/n)"); additionalDoor = Console.ReadLine(); } if (additionalDoor == "n") { Console.WriteLine("All doors added"); Console.Clear(); Menu(); } bool wasChanged = _badgesRepo.UpdateBadge(oldBadgeIDAsInt, newBadge); if (wasChanged) { Console.WriteLine("Badge Updated"); } else { Console.WriteLine("Could not update"); } } }