Esempio n. 1
0
        public TeamComponent Post(TeamComponentDTO value)
        {
            TeamComponent model = new TeamComponent()
            {
                TeamId      = value.Id_team,
                ComponentId = value.Id_component
            };

            return(ITeamComponentRepository.Create(model));
        }
Esempio n. 2
0
        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));
        }