From 688f7540367f3b0a11a2759b0e46c9952182153f Mon Sep 17 00:00:00 2001 From: 28810 <28810@YEXIANGQIN> Date: Sat, 1 Aug 2020 21:57:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=20=20object=20parms=20?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FreeSql/FreeSql.xml | 211 +++++++++++++++++++-- FreeSql/Interface/Curd/IDelete.cs | 3 +- FreeSql/Interface/Curd/ISelect/ISelect0.cs | 27 ++- FreeSql/Interface/Curd/IUpdate.cs | 6 +- FreeSql/Interface/IAdo.cs | 48 +++-- 5 files changed, 247 insertions(+), 48 deletions(-) diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml index 2f7bca79..bde37cf0 100644 --- a/FreeSql/FreeSql.xml +++ b/FreeSql/FreeSql.xml @@ -932,7 +932,8 @@ - 原生sql语法条件,Where("id = ?id", new { id = 1 }) + 原生sql语法条件,Where("id = ?id", new { id = 1 }) + 提示:parms 参数还可以传 Dictionary<string, object> sql语法条件 参数 @@ -1441,7 +1442,8 @@ - 左联查询,使用原生sql语法,LeftJoin("type b on b.id = a.id and b.clicks > ?clicks", new { clicks = 1 }) + 左联查询,使用原生sql语法,LeftJoin("type b on b.id = a.id and b.clicks > ?clicks", new { clicks = 1 }) + 提示:parms 参数还可以传 Dictionary<string, object> sql语法条件 参数 @@ -1449,7 +1451,8 @@ - 联接查询,使用原生sql语法,InnerJoin("type b on b.id = a.id and b.clicks > ?clicks", new { clicks = 1 }) + 联接查询,使用原生sql语法,InnerJoin("type b on b.id = a.id and b.clicks > ?clicks", new { clicks = 1 }) + 提示:parms 参数还可以传 Dictionary<string, object> sql语法条件 参数 @@ -1457,7 +1460,8 @@ - 右联查询,使用原生sql语法,RightJoin("type b on b.id = a.id and b.clicks > ?clicks", new { clicks = 1 }) + 右联查询,使用原生sql语法,RightJoin("type b on b.id = a.id and b.clicks > ?clicks", new { clicks = 1 }) + 提示:parms 参数还可以传 Dictionary<string, object> sql语法条件 参数 @@ -1473,7 +1477,8 @@ - 原生sql语法条件,Where("id = ?id", new { id = 1 }) + 原生sql语法条件,Where("id = ?id", new { id = 1 }) + 提示:parms 参数还可以传 Dictionary<string, object> sql语法条件 参数 @@ -1481,7 +1486,8 @@ - 原生sql语法条件,WhereIf(true, "id = ?id", new { id = 1 }) + 原生sql语法条件,WhereIf(true, "id = ?id", new { id = 1 }) + 提示:parms 参数还可以传 Dictionary<string, object> true 时生效 sql语法条件 @@ -1520,7 +1526,8 @@ - 按原生sql语法分组,GroupBy("concat(name, ?cc)", new { cc = 1 }) + 按原生sql语法分组,GroupBy("concat(name, ?cc)", new { cc = 1 }) + 提示:parms 参数还可以传 Dictionary<string, object> sql语法 参数 @@ -1528,7 +1535,8 @@ - 按原生sql语法聚合条件过滤,Having("count(name) = ?cc", new { cc = 1 }) + 按原生sql语法聚合条件过滤,Having("count(name) = ?cc", new { cc = 1 }) + 提示:parms 参数还可以传 Dictionary<string, object> sql语法条件 参数 @@ -1536,7 +1544,8 @@ - 按原生sql语法排序,OrderBy("count(name) + ?cc desc", new { cc = 1 }) + 按原生sql语法排序,OrderBy("count(name) + ?cc desc", new { cc = 1 }) + 提示:parms 参数还可以传 Dictionary<string, object> sql语法 参数 @@ -1544,7 +1553,8 @@ - 按原生sql语法排序,OrderBy(true, "count(name) + ?cc desc", new { cc = 1 }) + 按原生sql语法排序,OrderBy(true, "count(name) + ?cc desc", new { cc = 1 }) + 提示:parms 参数还可以传 Dictionary<string, object> true 时生效 sql语法 @@ -2291,7 +2301,8 @@ - 设置值,自定义SQL语法,SetRaw("title = ?title", new { title = "newtitle" }) + 设置值,自定义SQL语法,SetRaw("title = ?title", new { title = "newtitle" }) + 提示:parms 参数还可以传 Dictionary<string, object> sql语法 参数 @@ -2317,7 +2328,8 @@ - 原生sql语法条件,Where("id = ?id", new { id = 1 }) + 原生sql语法条件,Where("id = ?id", new { id = 1 }) + 提示:parms 参数还可以传 Dictionary<string, object> sql语法条件 参数 @@ -2444,7 +2456,8 @@ - 查询,ExecuteReader(dr => {}, "select * from user where age > ?age", new { age = 25 }) + 查询,ExecuteReader(dr => {}, "select * from user where age > ?age", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> @@ -2458,7 +2471,8 @@ - 查询,ExecuteArray("select * from user where age > ?age", new { age = 25 }) + 查询,ExecuteArray("select * from user where age > ?age", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> @@ -2473,7 +2487,8 @@ - 查询,ExecuteDataSet("select * from user where age > ?age; select 2", new { age = 25 }) + 查询,ExecuteDataSet("select * from user where age > ?age; select 2", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> @@ -2488,7 +2503,8 @@ - 查询,ExecuteDataTable("select * from user where age > ?age", new { age = 25 }) + 查询,ExecuteDataTable("select * from user where age > ?age", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> @@ -2504,7 +2520,8 @@ - 在【主库】执行,ExecuteNonQuery("delete from user where age > ?age", new { age = 25 }) + 在【主库】执行,ExecuteNonQuery("delete from user where age > ?age", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> @@ -2520,7 +2537,8 @@ - 在【主库】执行,ExecuteScalar("select 1 from user where age > ?age", new { age = 25 }) + 在【主库】执行,ExecuteScalar("select 1 from user where age > ?age", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> @@ -2538,7 +2556,8 @@ - 执行SQL返回对象集合,Query<User>("select * from user where age > ?age", new { age = 25 }) + 执行SQL返回对象集合,Query<User>("select * from user where age > ?age", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> @@ -2557,7 +2576,147 @@ - 执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new { age = 25 }) + 执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> + + + + + + + + + 查询,若使用读写分离,查询【从库】条件cmdText.StartsWith("SELECT "),否则查询【主库】 + + + + + + + + + 查询,ExecuteReaderAsync(dr => {}, "select * from user where age > ?age", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> + + + + + + + 查询 + + + + + + + 查询,ExecuteArrayAsync("select * from user where age > ?age", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> + + + + + + + + 查询 + + + + + + + 查询,ExecuteDataSetAsync("select * from user where age > ?age; select 2", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> + + + + + + + + 查询 + + + + + + + 查询,ExecuteDataTableAsync("select * from user where age > ?age", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> + + + + + + + + 在【主库】执行 + + + + + + + + 在【主库】执行,ExecuteNonQueryAsync("delete from user where age > ?age", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> + + + + + + + + 在【主库】执行 + + + + + + + + 在【主库】执行,ExecuteScalarAsync("select 1 from user where age > ?age", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> + + + + + + + + 执行SQL返回对象集合,QueryAsync<User>("select * from user where age > ?age", new SqlParameter { ParameterName = "age", Value = 25 }) + + + + + + + + + + 执行SQL返回对象集合,QueryAsync<User>("select * from user where age > ?age", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> + + + + + + + + + 执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new SqlParameter { ParameterName = "age", Value = 25 }) + + + + + + + + + + 执行SQL返回对象集合,Query<User, Address>("select * from user where age > ?age; select * from address", new { age = 25 }) + 提示:parms 参数还可以传 Dictionary<string, object> @@ -3233,6 +3392,12 @@ 超时 + + + 获取资源 + + + 使用完毕后,归还资源 @@ -3303,6 +3468,12 @@ 资源对象 + + + 从对象池获取对象成功的时候触发,通过该方法统计或初始化对象 + + 资源对象 + 归还对象给对象池的时候触发 diff --git a/FreeSql/Interface/Curd/IDelete.cs b/FreeSql/Interface/Curd/IDelete.cs index deab6936..0edfd394 100644 --- a/FreeSql/Interface/Curd/IDelete.cs +++ b/FreeSql/Interface/Curd/IDelete.cs @@ -30,7 +30,8 @@ namespace FreeSql /// IDelete Where(Expression> exp); /// - /// 原生sql语法条件,Where("id = ?id", new { id = 1 }) + /// 原生sql语法条件,Where("id = ?id", new { id = 1 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// sql语法条件 /// 参数 diff --git a/FreeSql/Interface/Curd/ISelect/ISelect0.cs b/FreeSql/Interface/Curd/ISelect/ISelect0.cs index a7b61482..3e7fee26 100644 --- a/FreeSql/Interface/Curd/ISelect/ISelect0.cs +++ b/FreeSql/Interface/Curd/ISelect/ISelect0.cs @@ -218,21 +218,24 @@ namespace FreeSql TSelect RightJoin(Expression> exp); /// - /// 左联查询,使用原生sql语法,LeftJoin("type b on b.id = a.id and b.clicks > ?clicks", new { clicks = 1 }) + /// 左联查询,使用原生sql语法,LeftJoin("type b on b.id = a.id and b.clicks > ?clicks", new { clicks = 1 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// sql语法条件 /// 参数 /// TSelect LeftJoin(string sql, object parms = null); /// - /// 联接查询,使用原生sql语法,InnerJoin("type b on b.id = a.id and b.clicks > ?clicks", new { clicks = 1 }) + /// 联接查询,使用原生sql语法,InnerJoin("type b on b.id = a.id and b.clicks > ?clicks", new { clicks = 1 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// sql语法条件 /// 参数 /// TSelect InnerJoin(string sql, object parms = null); /// - /// 右联查询,使用原生sql语法,RightJoin("type b on b.id = a.id and b.clicks > ?clicks", new { clicks = 1 }) + /// 右联查询,使用原生sql语法,RightJoin("type b on b.id = a.id and b.clicks > ?clicks", new { clicks = 1 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// sql语法条件 /// 参数 @@ -247,14 +250,16 @@ namespace FreeSql TSelect RawJoin(string sql); /// - /// 原生sql语法条件,Where("id = ?id", new { id = 1 }) + /// 原生sql语法条件,Where("id = ?id", new { id = 1 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// sql语法条件 /// 参数 /// TSelect Where(string sql, object parms = null); /// - /// 原生sql语法条件,WhereIf(true, "id = ?id", new { id = 1 }) + /// 原生sql语法条件,WhereIf(true, "id = ?id", new { id = 1 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// true 时生效 /// sql语法条件 @@ -293,14 +298,16 @@ namespace FreeSql TSelect ForUpdate(bool nowait = false); /// - /// 按原生sql语法分组,GroupBy("concat(name, ?cc)", new { cc = 1 }) + /// 按原生sql语法分组,GroupBy("concat(name, ?cc)", new { cc = 1 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// sql语法 /// 参数 /// TSelect GroupBy(string sql, object parms = null); /// - /// 按原生sql语法聚合条件过滤,Having("count(name) = ?cc", new { cc = 1 }) + /// 按原生sql语法聚合条件过滤,Having("count(name) = ?cc", new { cc = 1 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// sql语法条件 /// 参数 @@ -308,14 +315,16 @@ namespace FreeSql TSelect Having(string sql, object parms = null); /// - /// 按原生sql语法排序,OrderBy("count(name) + ?cc desc", new { cc = 1 }) + /// 按原生sql语法排序,OrderBy("count(name) + ?cc desc", new { cc = 1 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// sql语法 /// 参数 /// TSelect OrderBy(string sql, object parms = null); /// - /// 按原生sql语法排序,OrderBy(true, "count(name) + ?cc desc", new { cc = 1 }) + /// 按原生sql语法排序,OrderBy(true, "count(name) + ?cc desc", new { cc = 1 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// true 时生效 /// sql语法 diff --git a/FreeSql/Interface/Curd/IUpdate.cs b/FreeSql/Interface/Curd/IUpdate.cs index c2fd0b2b..5d4fb144 100644 --- a/FreeSql/Interface/Curd/IUpdate.cs +++ b/FreeSql/Interface/Curd/IUpdate.cs @@ -142,7 +142,8 @@ namespace FreeSql /// IUpdate SetIf(bool condition, Expression> exp); /// - /// 设置值,自定义SQL语法,SetRaw("title = ?title", new { title = "newtitle" }) + /// 设置值,自定义SQL语法,SetRaw("title = ?title", new { title = "newtitle" }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// sql语法 /// 参数 @@ -167,7 +168,8 @@ namespace FreeSql /// IUpdate Where(Expression> exp); /// - /// 原生sql语法条件,Where("id = ?id", new { id = 1 }) + /// 原生sql语法条件,Where("id = ?id", new { id = 1 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// sql语法条件 /// 参数 diff --git a/FreeSql/Interface/IAdo.cs b/FreeSql/Interface/IAdo.cs index 02626f8e..788fbcb9 100644 --- a/FreeSql/Interface/IAdo.cs +++ b/FreeSql/Interface/IAdo.cs @@ -66,7 +66,8 @@ namespace FreeSql void ExecuteReader(DbTransaction transaction, Action> fetchHandler, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); void ExecuteReader(DbConnection connection, DbTransaction transaction, Action> fetchHandler, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 查询,ExecuteReader(dr => {}, "select * from user where age > ?age", new { age = 25 }) + /// 查询,ExecuteReader(dr => {}, "select * from user where age > ?age", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -82,7 +83,8 @@ namespace FreeSql object[][] ExecuteArray(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); object[][] ExecuteArray(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 查询,ExecuteArray("select * from user where age > ?age", new { age = 25 }) + /// 查询,ExecuteArray("select * from user where age > ?age", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -99,7 +101,8 @@ namespace FreeSql DataSet ExecuteDataSet(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); DataSet ExecuteDataSet(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 查询,ExecuteDataSet("select * from user where age > ?age; select 2", new { age = 25 }) + /// 查询,ExecuteDataSet("select * from user where age > ?age; select 2", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -116,7 +119,8 @@ namespace FreeSql DataTable ExecuteDataTable(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); DataTable ExecuteDataTable(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 查询,ExecuteDataTable("select * from user where age > ?age", new { age = 25 }) + /// 查询,ExecuteDataTable("select * from user where age > ?age", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -134,7 +138,8 @@ namespace FreeSql int ExecuteNonQuery(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); int ExecuteNonQuery(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 在【主库】执行,ExecuteNonQuery("delete from user where age > ?age", new { age = 25 }) + /// 在【主库】执行,ExecuteNonQuery("delete from user where age > ?age", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -152,7 +157,8 @@ namespace FreeSql object ExecuteScalar(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); object ExecuteScalar(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 在【主库】执行,ExecuteScalar("select 1 from user where age > ?age", new { age = 25 }) + /// 在【主库】执行,ExecuteScalar("select 1 from user where age > ?age", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -174,7 +180,8 @@ namespace FreeSql List Query(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); List Query(Type resultType, DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 执行SQL返回对象集合,Query<User>("select * from user where age > ?age", new { age = 25 }) + /// 执行SQL返回对象集合,Query<User>("select * from user where age > ?age", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -196,7 +203,8 @@ namespace FreeSql NaviteTuple, List> Query(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); NaviteTuple, List> Query(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new { age = 25 }) + /// 执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -239,7 +247,8 @@ namespace FreeSql Task ExecuteReaderAsync(DbTransaction transaction, Func, Task> readerHander, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); Task ExecuteReaderAsync(DbConnection connection, DbTransaction transaction, Func, Task> readerHander, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 查询,ExecuteReaderAsync(dr => {}, "select * from user where age > ?age", new { age = 25 }) + /// 查询,ExecuteReaderAsync(dr => {}, "select * from user where age > ?age", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -255,7 +264,8 @@ namespace FreeSql Task ExecuteArrayAsync(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); Task ExecuteArrayAsync(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 查询,ExecuteArrayAsync("select * from user where age > ?age", new { age = 25 }) + /// 查询,ExecuteArrayAsync("select * from user where age > ?age", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -272,7 +282,8 @@ namespace FreeSql Task ExecuteDataSetAsync(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); Task ExecuteDataSetAsync(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 查询,ExecuteDataSetAsync("select * from user where age > ?age; select 2", new { age = 25 }) + /// 查询,ExecuteDataSetAsync("select * from user where age > ?age; select 2", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -289,7 +300,8 @@ namespace FreeSql Task ExecuteDataTableAsync(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); Task ExecuteDataTableAsync(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 查询,ExecuteDataTableAsync("select * from user where age > ?age", new { age = 25 }) + /// 查询,ExecuteDataTableAsync("select * from user where age > ?age", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -307,7 +319,8 @@ namespace FreeSql Task ExecuteNonQueryAsync(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); Task ExecuteNonQueryAsync(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 在【主库】执行,ExecuteNonQueryAsync("delete from user where age > ?age", new { age = 25 }) + /// 在【主库】执行,ExecuteNonQueryAsync("delete from user where age > ?age", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -325,7 +338,8 @@ namespace FreeSql Task ExecuteScalarAsync(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); Task ExecuteScalarAsync(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 在【主库】执行,ExecuteScalarAsync("select 1 from user where age > ?age", new { age = 25 }) + /// 在【主库】执行,ExecuteScalarAsync("select 1 from user where age > ?age", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -347,7 +361,8 @@ namespace FreeSql Task> QueryAsync(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); Task> QueryAsync(Type resultType, DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 执行SQL返回对象集合,QueryAsync<User>("select * from user where age > ?age", new { age = 25 }) + /// 执行SQL返回对象集合,QueryAsync<User>("select * from user where age > ?age", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// /// @@ -369,7 +384,8 @@ namespace FreeSql Task, List>> QueryAsync(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); Task, List>> QueryAsync(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms); /// - /// 执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new { age = 25 }) + /// 执行SQL返回对象集合,Query<User, Address>("select * from user where age > ?age; select * from address", new { age = 25 }) + /// 提示:parms 参数还可以传 Dictionary<string, object> /// /// ///