mirror of
https://github.com/bitwarden/server
synced 2025-12-14 15:23:42 +00:00
[AC-432] Checking if any of the selected Organizations is already assigned to a Provider
This commit is contained in:
@@ -99,6 +99,20 @@ public class ProviderOrganizationRepository : Repository<ProviderOrganization, G
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<ProviderOrganization>> GetManyByOrganizationIdsAsync(
|
||||
IEnumerable<Guid> organizationIds)
|
||||
{
|
||||
using (var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.QueryAsync<ProviderOrganization>(
|
||||
$"[{Schema}].[ProviderOrganization_ReadByOrganizationIds]",
|
||||
new { Ids = organizationIds.ToGuidIdArrayTVP() },
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
return results.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
private DataTable BuildProviderOrganizationsTable(SqlBulkCopy bulkCopy, IEnumerable<ProviderOrganization> providerOrganizations)
|
||||
{
|
||||
var po = providerOrganizations.FirstOrDefault();
|
||||
|
||||
Reference in New Issue
Block a user