mirror of
https://github.com/bitwarden/server.git
synced 2025-04-24 14:26:38 -05:00
20 lines
584 B
C#
20 lines
584 B
C#
using Bit.Infrastructure.EntityFramework.Models;
|
|
|
|
namespace Bit.Infrastructure.EntityFramework.Repositories.Queries;
|
|
|
|
public class CollectionCipherReadByUserIdCipherIdQuery : CollectionCipherReadByUserIdQuery
|
|
{
|
|
private readonly Guid _cipherId;
|
|
|
|
public CollectionCipherReadByUserIdCipherIdQuery(Guid userId, Guid cipherId) : base(userId)
|
|
{
|
|
_cipherId = cipherId;
|
|
}
|
|
|
|
public override IQueryable<CollectionCipher> Run(DatabaseContext dbContext)
|
|
{
|
|
var query = base.Run(dbContext);
|
|
return query.Where(x => x.CipherId == _cipherId);
|
|
}
|
|
}
|