1
0
mirror of https://github.com/bitwarden/server synced 2025-12-15 07:43:54 +00:00

[PM-17449] Add stored proc, EF query, and an integration test for them (#5413)

This commit is contained in:
Jimmy Vo
2025-02-20 15:08:06 -05:00
committed by GitHub
parent 93e5f7d0fe
commit 2f4d5283d3
6 changed files with 142 additions and 0 deletions

View File

@@ -46,6 +46,20 @@ public class OrganizationDomainRepository : Repository<OrganizationDomain, Guid>
}
}
public async Task<IEnumerable<OrganizationDomain>> GetVerifiedDomainsByOrganizationIdsAsync(IEnumerable<Guid> organizationIds)
{
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync<OrganizationDomain>(
$"[{Schema}].[OrganizationDomain_ReadByOrganizationIds]",
new { OrganizationIds = organizationIds.ToGuidIdArrayTVP() },
commandType: CommandType.StoredProcedure);
return results.ToList();
}
}
public async Task<ICollection<OrganizationDomain>> GetManyByNextRunDateAsync(DateTime date)
{
using var connection = new SqlConnection(ConnectionString);