mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 00:52:49 -05:00
22 lines
615 B
C#
22 lines
615 B
C#
using Bit.Infrastructure.EntityFramework.Models;
|
|
|
|
namespace Bit.Infrastructure.EntityFramework.Repositories.Queries;
|
|
|
|
public class CollectionReadCountByOrganizationIdQuery : IQuery<Collection>
|
|
{
|
|
private readonly Guid _organizationId;
|
|
|
|
public CollectionReadCountByOrganizationIdQuery(Guid organizationId)
|
|
{
|
|
_organizationId = organizationId;
|
|
}
|
|
|
|
public IQueryable<Collection> Run(DatabaseContext dbContext)
|
|
{
|
|
var query = from c in dbContext.Collections
|
|
where c.OrganizationId == _organizationId
|
|
select c;
|
|
return query;
|
|
}
|
|
}
|