Exemple #1
0
        public ScrumMasterDTO GetById(int Id)
        {
            ScrumMasterDTO retour = new ScrumMasterDTO();
            ScrumMaster    objet  = _repo.Get(Id);

            retour = MapScrumMasterDTO.ToDto(objet);
            return(retour);
        }
Exemple #2
0
        public ScrumMasterDTO Update(ScrumMasterDTO objet)
        {
            ScrumMaster    entity   = MapScrumMaster.ToEntity(objet, false);
            ScrumMaster    resultat = _repo.Update(entity);
            ScrumMasterDTO retour   = MapScrumMasterDTO.ToDto(resultat);

            return(retour);
        }
Exemple #3
0
        public ScrumMasterDTO Create(ScrumMasterDTO objet)
        {
            ScrumMaster entite   = MapScrumMaster.ToEntity(objet, true);
            ScrumMaster resultat = _repo.Create(entite);

            objet = MapScrumMasterDTO.ToDto(resultat);
            return(objet);
        }
Exemple #4
0
        public List <ScrumMasterDTO> ListActive()
        {
            List <ScrumMasterDTO> retour = new List <ScrumMasterDTO>();
            List <ScrumMaster>    liste  = _repo.GetAllActive();

            retour = MapScrumMasterDTO.ToDto(liste);
            return(retour);
        }
Exemple #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);
        }
Exemple #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);
        }