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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user