Example #1
0
        public void AddDevtoDevTeam()
        {
            Console.Clear();
            //Prompt the user for a Desired Developer ID
            Console.WriteLine("Enter Developer ID you with to add");
            //Create a Developer object and instantiate the GetDeveloperById helper method and pass in the desired Id the user gave.
            string    idAsString   = Console.ReadLine();
            int       idAsInt      = int.Parse(idAsString);
            Developer newDeveloper = _developerRepo.GetDeveloperByID(idAsInt);

            //prompt the user for a desired DevTeam Id
            Console.WriteLine("Enter Desired Team Name");
            string teamNameasString = Console.ReadLine();

            ////Create a DevTeam object and instantiate the GetDevTeamById helper method and pass in the desired Id the user gave.
            DevTeam newDevTeam = _devTeam.GetTeamByTeamName(teamNameasString);


            //Then your going to call the_devTeam field and then the AddDevtoDevTeam Method within the DevTeamRepo and pass in you Developer object (local variable) and your DevTeam object (Local variable)
            _devTeam.AddDevToDevTeam(newDeveloper, newDevTeam);
        }