File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
OpenAPI/LearningHub.Nhs.OpenApi.Repositories/Repositories/Hierarchy Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,6 @@ public async Task<List<CatalogueNodeVersion>> GetPublishedCatalogues()
8282 /// <returns>The <see cref="Task"/>.</returns>
8383 public IQueryable < CatalogueNodeVersion > GetPublishedCataloguesForUserAsync ( int userId )
8484 {
85- var communityCatalogue = DbContext . CatalogueNodeVersion . AsNoTracking ( )
86- . Include ( cnv => cnv . NodeVersion . Node )
87- . Where ( cnv => cnv . NodeVersion . VersionStatusEnum == VersionStatusEnum . Published
88- && cnv . NodeVersion . NodeId == 1 /* Community Catalogue */ ) ;
8985
9086 var cataloguesForUser = from cnv in DbContext . CatalogueNodeVersion . Include ( cnv => cnv . NodeVersion . Node ) . AsNoTracking ( )
9187 join nv in DbContext . NodeVersion . Where ( cnv => cnv . VersionStatusEnum == VersionStatusEnum . Published && ! cnv . Deleted ) // .Include(nv => nv.Node)
@@ -100,9 +96,9 @@ join n in DbContext.Node.Where(x => !x.Deleted)
10096 on nv . Id equals n . CurrentNodeVersionId
10197 select cnv ;
10298
103- var returnedCatalogues = communityCatalogue . Union ( cataloguesForUser ) . Distinct ( )
104- . OrderBy ( cnv => cnv . NodeVersion . NodeId != 1 )
105- . ThenBy ( cnv => cnv . Name ) ;
99+ var returnedCatalogues = cataloguesForUser . Distinct ( )
100+ . OrderBy ( cnv => cnv . NodeVersion . NodeId != 1 )
101+ . ThenBy ( cnv => cnv . Name ) ;
106102
107103 return returnedCatalogues ;
108104 }
You can’t perform that action at this time.
0 commit comments