//Update public bool UpdateExistingDevTeam(string originalName, DevTeam newDevTeam) { DevTeam oldDevTeam = GetDevTeamByName(originalName); if (oldDevTeam != null) { oldDevTeam.TeamName = newDevTeam.TeamName; oldDevTeam.TeamNumber = newDevTeam.TeamNumber; oldDevTeam.Members = newDevTeam.Members; return(true); } else { return(false); } }
//Delete - returns false public bool RemoveDevTeamFromList(string name) { DevTeam devTeam = GetDevTeamByName(name); if (devTeam == null) { return(false); } int initialCount = _listOfDevTeams.Count; _listOfDevTeams.Remove(devTeam); if (initialCount > _listOfDevTeams.Count) { return(true); } else { return(false); } }
//Create public void AddDevTeamToList(DevTeam devTeam) { _listOfDevTeams.Add(devTeam); }