internal static List <UserStoryDTO> ToDto(List <UserStory> liste) { //récupération de la liste d'entités USContentDTO transformés en entités List <UserStoryDTO> retour = new List <UserStoryDTO>(); retour = liste.Select(x => new UserStoryDTO() { Id = x.Id, Version = x.Version, Label = x.Label, Role = x.Role, Project = MapProjectDTO.ToDto(x.Project), Priority = x.Priority, DateCreation = (System.DateTime)x.DateCreation, DateModification = (System.DateTime)x.DateModification, EpicStory = x.EpicStory, StoryPoints = x.StoryPoints, Function1 = x.Function1, Function2 = x.Function2, Notes = x.Notes, IsDeleted = x.IsDeleted, ProjectId = x.ProjectId //proprietes dto }).ToList(); return(retour); }
public ProjectDTO Update(ProjectDTO objet) { Project entity = MapProject.ToEntity(objet, false); Project resultat = _repo.Update(entity); ProjectDTO retour = MapProjectDTO.ToDto(resultat); return(retour); }
public ProjectDTO GetById(int Id) { ProjectDTO retour = new ProjectDTO(); Project objet = _repo.Get(Id); retour = MapProjectDTO.ToDto(objet); return(retour); }
public List <ProjectDTO> ListActive() { List <ProjectDTO> retour = new List <ProjectDTO>(); List <Project> liste = _repo.GetAllActive(); retour = MapProjectDTO.ToDto(liste); return(retour); }
public ProjectDTO Create(ProjectDTO objet) { Project entite = MapProject.ToEntity(objet, true); Project resultat = _repo.Create(entite); objet = MapProjectDTO.ToDto(resultat); return(objet); }