public ScrumMasterDTO GetById(int Id) { ScrumMasterDTO retour = new ScrumMasterDTO(); ScrumMaster objet = _repo.Get(Id); retour = MapScrumMasterDTO.ToDto(objet); return(retour); }
public ScrumMasterDTO Update(ScrumMasterDTO objet) { ScrumMaster entity = MapScrumMaster.ToEntity(objet, false); ScrumMaster resultat = _repo.Update(entity); ScrumMasterDTO retour = MapScrumMasterDTO.ToDto(resultat); return(retour); }
public ScrumMasterDTO Create(ScrumMasterDTO objet) { ScrumMaster entite = MapScrumMaster.ToEntity(objet, true); ScrumMaster resultat = _repo.Create(entite); objet = MapScrumMasterDTO.ToDto(resultat); return(objet); }
public List <ScrumMasterDTO> ListActive() { List <ScrumMasterDTO> retour = new List <ScrumMasterDTO>(); List <ScrumMaster> liste = _repo.GetAllActive(); retour = MapScrumMasterDTO.ToDto(liste); return(retour); }
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); }
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); }