1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 00:22:50 -05:00

Added get for sso config repo by revision date (#878)

This commit is contained in:
Chad Scharf
2020-08-19 13:35:17 -04:00
committed by GitHub
parent 80f57d22a7
commit 8884157427
4 changed files with 51 additions and 0 deletions

View File

@ -5,6 +5,7 @@ using System.Data.SqlClient;
using System.Data;
using Dapper;
using System.Linq;
using System.Collections.Generic;
namespace Bit.Core.Repositories.SqlServer
{
@ -43,5 +44,18 @@ namespace Bit.Core.Repositories.SqlServer
return results.SingleOrDefault();
}
}
public async Task<ICollection<SsoConfig>> GetManyByRevisionNotBeforeDate(DateTime? notBefore)
{
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync<SsoConfig>(
$"[{Schema}].[{Table}_ReadManyByNotBeforeRevisionDate]",
new { NotBefore = notBefore },
commandType: CommandType.StoredProcedure);
return results.ToList();
}
}
}
}