public static List <Project> GetAssociatedPrimaryAndSecondaryProjects(this TaxonomyLeaf taxonomyLeaf, FirmaSession currentFirmaSession) { return(taxonomyLeaf.GetProjects() .Union(taxonomyLeaf.SecondaryProjectTaxonomyLeafs.Select(x => x.Project)) .Distinct(new HavePrimaryKeyComparer <Project>()) .ToList() .GetActiveProjectsAndProposals(currentFirmaSession.CanViewProposals())); }
public static List <Project> GetAssociatedProjects(this TaxonomyLeaf taxonomyLeaf, FirmaSession currentFirmaSession) { return(taxonomyLeaf.GetProjects().ToList().GetActiveProjectsAndProposals(currentFirmaSession.CanViewProposals())); }