public ProjectDTO(Project project) { ProjectId = project.ProjectId; ProjectName = project.ProjectName; ProjectDescr = project.ProjectDescr; ProjectImage = project.ProjectImage; ESchoolYear = project.ESchoolGrade; ProjectBudget = project.ProjectBudget; Closed = project.Closed; ClassRoomId = project.ClassRoomId; ApplicationDomainId = project.ApplicationDomainId; if (project.ApplicationDomain != null) { ApplicationDomain = new ApplicationDomainDTO(project.ApplicationDomain); } Products = project.Products.Select(g => new ProductDTO(g)).ToList(); Groups = project.Groups.Select(g => new GroupDTO(g)).ToList(); EvaluationCritereas = project.EvaluationCritereas.Select(g => new EvaluationCritereaDTO(g)).ToList(); }
public ProjectTemplateDTO(ProjectTemplate pt) { ProjectTemplateId = pt.ProjectTemplateId; ProjectName = pt.ProjectName; ProjectDescr = pt.ProjectDescr; ProjectImage = pt.ProjectImage; AddedByGO = pt.AddedByGO; Budget = pt.Budget; MaxScore = pt.MaxScore; ApplicationDomainId = pt.ApplicationDomainId; if (pt.ApplicationDomain != null) { ApplicationDomain = new ApplicationDomainDTO(pt.ApplicationDomain); } ProductTemplates = pt.ProductTemplateProjectTemplates.Select(g => new ProductTemplateDTO(g.ProductTemplate)).ToList(); }