1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-28 17:57:37 +01:00

use proper Grant entity model for Dapper mapping (#3657)

This commit is contained in:
Kyle Spearrin 2024-01-10 14:18:08 -05:00 committed by GitHub
parent 3392ede534
commit 6fbb790988
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ public class GrantRepository : BaseRepository, IGrantRepository
{
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync<IGrant>(
var results = await connection.QueryAsync<Grant>(
"[dbo].[Grant_ReadByKey]",
new { Key = key },
commandType: CommandType.StoredProcedure);
@ -37,12 +37,12 @@ public class GrantRepository : BaseRepository, IGrantRepository
{
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync<IGrant>(
var results = await connection.QueryAsync<Grant>(
"[dbo].[Grant_Read]",
new { SubjectId = subjectId, SessionId = sessionId, ClientId = clientId, Type = type },
commandType: CommandType.StoredProcedure);
return results.ToList();
return results.ToList<IGrant>();
}
}