コード例 #1
0
ファイル: ProgramUI.cs プロジェクト: hbouwers/DevTeamsProject
        // Delete Dev Team
        private void DeleteDevTeam()
        {
            DisplayDevTeams();

            // Prompt user for team to delete
            Console.WriteLine("\nEnter the name of the team you would like to delete");
            // User input
            string name = Console.ReadLine();
            // Find team
            DevTeam team = _teamsRepo.GetDevTeamByName(name);
            // Delete content if not null
            bool success = _teamsRepo.DeleteDevTeam(team.Name);

            if (success)
            {
                Console.WriteLine("Team deleted");
            }
            else
            {
                Console.WriteLine("There was a problem");
            }
        }