Exemplo n.º 1
0
        public TeamDTO GetById(int Id)
        {
            TeamDTO retour = new TeamDTO();
            Team    objet  = _repo.Get(Id);

            retour = MapTeamDTO.ToDto(objet);
            return(retour);
        }
Exemplo n.º 2
0
        public List <TeamDTO> ListActive()
        {
            List <TeamDTO> retour = new List <TeamDTO>();
            List <Team>    liste  = _repo.GetAllActive();

            retour = MapTeamDTO.ToDto(liste);
            return(retour);
        }
Exemplo n.º 3
0
        public TeamDTO Update(TeamDTO objet)
        {
            Team    entite   = MapTeam.ToEntity(objet, false);
            Team    resultat = _repo.Update(entite);
            TeamDTO retour   = MapTeamDTO.ToDto(resultat);

            return(retour);
        }
Exemplo n.º 4
0
        public TeamDTO Create(TeamDTO objet)
        {
            Team    entite   = MapTeam.ToEntity(objet, true);
            Team    resultat = _repo.Create(entite);
            TeamDTO retour   = MapTeamDTO.ToDto(resultat);

            return(retour);
        }
Exemplo n.º 5
0
        internal static List <ProjectDTO> ToDto(List <TheMapToScrum.Back.DAL.Entities.Project> liste)
        {
            List <ProjectDTO> retour = new List <ProjectDTO>();

            retour = liste.Select(x => new ProjectDTO()
            {
                Id               = x.Id,
                DepartmentId     = x.DepartmentId,
                ProductOwnerId   = x.ProductOwnerId,
                TeamId           = x.TeamId,
                ScrumMasterId    = x.ScrumMasterId,
                Department       = MapDepartmentDTO.ToDto(x.Department),
                ProductOwner     = MapProductOwnerDTO.ToDto(x.ProductOwner),
                ScrumMaster      = MapScrumMasterDTO.ToDto(x.TechnicalManager),
                Team             = MapTeamDTO.ToDto(x.Team),
                DateCreation     = (System.DateTime)x.DateCreation,
                DateModification = (System.DateTime)x.DateModification,
                IsDeleted        = x.IsDeleted,
                Label            = x.Label
            }).ToList();
            return(retour);
        }
Exemplo n.º 6
0
        internal static ProjectDTO ToDto(Project objet)
        {
            ProjectDTO retour = new ProjectDTO();

            if (null != objet)
            {
                retour.Id               = objet.Id;
                retour.Label            = objet.Label;
                retour.ProductOwnerId   = objet.ProductOwnerId;
                retour.TeamId           = objet.TeamId;
                retour.ScrumMasterId    = objet.ScrumMasterId;
                retour.DepartmentId     = objet.DepartmentId;
                retour.Department       = MapDepartmentDTO.ToDto(objet.Department);
                retour.ScrumMaster      = MapScrumMasterDTO.ToDto(objet.TechnicalManager);
                retour.ProductOwner     = MapProductOwnerDTO.ToDto(objet.ProductOwner);
                retour.Team             = MapTeamDTO.ToDto(objet.Team);
                retour.DateCreation     = (System.DateTime)objet.DateCreation;
                retour.DateModification = (System.DateTime)objet.DateModification;
                retour.IsDeleted        = objet.IsDeleted;
            }
            return(retour);
        }