1
0
mirror of https://github.com/bitwarden/server synced 2026-01-02 00:23:40 +00:00

users listing page

This commit is contained in:
Kyle Spearrin
2018-03-21 16:24:10 -04:00
parent d35d8185ed
commit 67bf801c15
10 changed files with 234 additions and 7 deletions

View File

@@ -37,6 +37,19 @@ namespace Bit.Core.Repositories.SqlServer
}
}
public async Task<ICollection<User>> SearchByEmailAsync(string email, int skip, int take)
{
using(var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync<User>(
$"[{Schema}].[{Table}_SearchByEmail]",
new { Email = email, Skip = skip, Take = take },
commandType: CommandType.StoredProcedure);
return results.ToList();
}
}
public async Task<ICollection<User>> GetManyByPremiumAsync(bool premium)
{
using(var connection = new SqlConnection(ConnectionString))