mirror of
https://github.com/bitwarden/server.git
synced 2026-02-02 15:13:19 +08:00
22 lines
685 B
C#
22 lines
685 B
C#
|
|
using Bit.Core.Entities.Provider;
|
|||
|
|
|
|||
|
|
namespace Bit.Infrastructure.EntityFramework.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;
|
|||
|
|
}
|
|||
|
|
}
|