/// <summary> /// Wrap the query in a COUNT(1) query and returns the result /// </summary> public static async Task <long> LongCountAsync <T, TDb>(this ISqlSelect <T> select, DbContext context) { return(await DoConnection(context, conn => select.LongCountAsync(conn))); }
/// <summary> /// Wrap the query in a COUNT(1) query and returns the result /// </summary> public static async Task <int> CountAsync <T>(this ISqlSelect <T> select, NpgsqlConnection conn) { return((int)(await select.LongCountAsync(conn))); }