mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-30 19:54:16 -04:00
Fix count method of dapper
This commit is contained in:
parent
d7dd2bd138
commit
5f177e9338
@ -297,9 +297,9 @@ public static class DapperHelper
|
|||||||
|
|
||||||
IDapperSqlCommand cmd = query.Build();
|
IDapperSqlCommand cmd = query.Build();
|
||||||
// language=postgreSQL
|
// language=postgreSQL
|
||||||
string sql = $"select count(*) from ({cmd.Sql})";
|
string sql = $"select count(*) from ({cmd.Sql}) as query";
|
||||||
|
|
||||||
return await db.ExecuteAsync(
|
return await db.QuerySingleAsync<int>(
|
||||||
sql,
|
sql,
|
||||||
ParametersDictionary.LoadFrom(cmd)
|
ParametersDictionary.LoadFrom(cmd)
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user