//Update public bool UpdateExistingTeam(int originalId, DevTeam newTeam) { { //Find Team DevTeam oldTeam = GetTeamById(originalId); //Update Team if (oldTeam != null) { oldTeam.TeamId = newTeam.TeamId; oldTeam.TeamName = newTeam.TeamName; return(true); } else { return(false); } } }
//Delete public bool RemoveTeamFromList(int id) { DevTeam developer = GetTeamById(id); if (developer == null) { return(false); } int initialCount = _devTeam.Count; _devTeam.Remove(developer); if (initialCount > _devTeam.Count) { return(true); } else { return(false); } }
//Create public void AddTeamToList(DevTeam team) { _devTeam.Add(team); team.TeamId = _id; _id++; }