Ejemplo n.º 1
0
        public List <Project> FindProjects(Guid organizationId)
        {
            if (ProjectUsers == null)
            {
                ProjectUsers = new List <ProjectUser>();
            }

            var projects = ProjectUsers.Where(x => x.Project.OrganizationId == organizationId).Select(x => x.Project).ToList();

            return(projects);
        }
Ejemplo n.º 2
0
        public List <Organization> FindOrganizations()
        {
            if (OrganizationUsers == null)
            {
                OrganizationUsers = new List <OrganizationUser>();
            }

            List <Organization> organizations = new List <Organization>();

            organizations = OrganizationUsers.Select(x => x.Organization).ToList();

            var organizationsProjects = ProjectUsers.Where(x => x.Project.Status == EntityStatus.Active).Select(x => x.Project.Organization);

            organizations.AddRange(organizationsProjects);

            return(organizations.Distinct().ToList());
        }