diff --git a/src/Infrastructure.EntityFramework/Repositories/CollectionRepository.cs b/src/Infrastructure.EntityFramework/Repositories/CollectionRepository.cs index 755e69264..ce5b07b1c 100644 --- a/src/Infrastructure.EntityFramework/Repositories/CollectionRepository.cs +++ b/src/Infrastructure.EntityFramework/Repositories/CollectionRepository.cs @@ -186,13 +186,13 @@ public class CollectionRepository : Repository c.Id).Contains(cg.Collection.Id) + from c in collections + join cg in dbContext.CollectionGroups on c.Id equals cg.CollectionId group cg by cg.CollectionId into g select g; var users = - from cu in dbContext.CollectionUsers - where cu.Collection.OrganizationId == organizationId - && collections.Select(c => c.Id).Contains(cu.Collection.Id) + from c in collections + join cu in dbContext.CollectionUsers on c.Id equals cu.CollectionId group cu by cu.CollectionId into u select u; - return collections.Select(collection => new Tuple( collection,