mirror of
https://github.com/bitwarden/server.git
synced 2026-02-02 07:03:11 +08:00
24 lines
829 B
C#
24 lines
829 B
C#
using Bit.Core.AdminConsole.Entities.Provider;
|
|
using Bit.Infrastructure.EntityFramework.Repositories;
|
|
using Bit.Infrastructure.EntityFramework.Repositories.Queries;
|
|
|
|
namespace Bit.Infrastructure.EntityFramework.AdminConsole.Repositories.Queries;
|
|
|
|
public class ProviderOrganizationCountByOrganizationIdsQuery : IQuery<ProviderOrganization>
|
|
{
|
|
private readonly IEnumerable<Guid> _organizationIds;
|
|
|
|
public ProviderOrganizationCountByOrganizationIdsQuery(IEnumerable<Guid> organizationIds)
|
|
{
|
|
_organizationIds = organizationIds;
|
|
}
|
|
|
|
public IQueryable<ProviderOrganization> Run(DatabaseContext dbContext)
|
|
{
|
|
var query = from po in dbContext.ProviderOrganizations
|
|
where _organizationIds.Contains(po.OrganizationId)
|
|
select po;
|
|
return query;
|
|
}
|
|
}
|