Files
server/src/Infrastructure.EntityFramework/Repositories/Queries/CollectionReadCountByOrganizationIdQuery.cs
Justin Baur bae03feffe Revert filescoped (#2227)
* Revert "Add git blame entry (#2226)"

This reverts commit 239286737d.

* Revert "Turn on file scoped namespaces (#2225)"

This reverts commit 34fb4cca2a.
2022-08-29 15:53:48 -04:00

23 lines
677 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;
}
}
}