mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-10-31 10:37:13 -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(); | ||||
| 		// 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, | ||||
| 			ParametersDictionary.LoadFrom(cmd) | ||||
| 		); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user