public TeamComponent Post(TeamComponentDTO value) { TeamComponent model = new TeamComponent() { TeamId = value.Id_team, ComponentId = value.Id_component }; return(ITeamComponentRepository.Create(model)); }
public TeamComponent Put(int id, TeamComponentDTO value) { TeamComponent model = ITeamComponentRepository.Get(id); if (value.Id_team > 0) { model.TeamId = value.Id_team; } if (value.Id_component > 0) { model.ComponentId = value.Id_component; } return(ITeamComponentRepository.Update(model)); }