mirror of
https://github.com/bitwarden/server
synced 2025-12-16 00:03:54 +00:00
[AC-432] Changed ProviderOrganization_ReadByOrganizationIds to only get count
This commit is contained in:
@@ -68,15 +68,9 @@ public class ProviderOrganizationRepository :
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<ProviderOrganization>> GetManyByOrganizationIdsAsync(IEnumerable<Guid> organizationIds)
|
||||
public async Task<int> GetCountByOrganizationIdsAsync(IEnumerable<Guid> organizationIds)
|
||||
{
|
||||
using (var scope = ServiceScopeFactory.CreateScope())
|
||||
{
|
||||
var dbContext = GetDatabaseContext(scope);
|
||||
var query = from po in dbContext.ProviderOrganizations
|
||||
where organizationIds.Contains(po.OrganizationId)
|
||||
select po;
|
||||
return await query.ToListAsync();
|
||||
}
|
||||
var query = new ProviderOrganizationCountByOrganizationIdsQuery(organizationIds);
|
||||
return await GetCountFromQuery(query);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user