diff --git a/Examples/dbcontext_01/.config/dotnet-tools.json b/Examples/dbcontext_01/.config/dotnet-tools.json
new file mode 100644
index 00000000..c735fef1
--- /dev/null
+++ b/Examples/dbcontext_01/.config/dotnet-tools.json
@@ -0,0 +1,12 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "dotnet-ef": {
+ "version": "5.0.0",
+ "commands": [
+ "dotnet-ef"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/Examples/dbcontext_01/Properties/PublishProfiles/FolderProfile.pubxml b/Examples/dbcontext_01/Properties/PublishProfiles/FolderProfile.pubxml
new file mode 100644
index 00000000..d895b3b8
--- /dev/null
+++ b/Examples/dbcontext_01/Properties/PublishProfiles/FolderProfile.pubxml
@@ -0,0 +1,22 @@
+
+
+
+
+ True
+ False
+ True
+ Release
+ Any CPU
+ FileSystem
+ bin\Release\net5.0\publish\
+ FileSystem
+
+ net5.0
+ win-x86
+ 690f89e0-a721-423f-8f5d-d262f73235ea
+ true
+ True
+
+
\ No newline at end of file
diff --git a/Examples/dbcontext_01/dbcontext_01.csproj b/Examples/dbcontext_01/dbcontext_01.csproj
index 2b5846c8..46c1f9de 100644
--- a/Examples/dbcontext_01/dbcontext_01.csproj
+++ b/Examples/dbcontext_01/dbcontext_01.csproj
@@ -3,6 +3,11 @@
net5.0
InProcess
+ f2b3f543-99d4-4be7-b894-6df3c6cbad7e
+
+
+
+ dbcontext_01.xml
@@ -12,7 +17,7 @@
-
+
diff --git a/Examples/dbcontext_01/dbcontext_01.xml b/Examples/dbcontext_01/dbcontext_01.xml
new file mode 100644
index 00000000..b9d14721
--- /dev/null
+++ b/Examples/dbcontext_01/dbcontext_01.xml
@@ -0,0 +1,8 @@
+
+
+
+ dbcontext_01
+
+
+
+
diff --git a/FreeSql/Extensions/AdoNetExtensions.cs b/FreeSql/Extensions/AdoNetExtensions.cs
index b9f874ba..a4275d06 100644
--- a/FreeSql/Extensions/AdoNetExtensions.cs
+++ b/FreeSql/Extensions/AdoNetExtensions.cs
@@ -85,6 +85,7 @@ namespace FreeSql
/// 插入数据,传入实体
///
///
+ ///
///
///
public static IInsert Insert(this IDbConnection that, T1 source) where T1 : class => GetCrud(that).Insert(source).WithConnection(that as DbConnection);
@@ -92,6 +93,7 @@ namespace FreeSql
/// 插入数据,传入实体数组
///
///
+ ///
///
///
public static IInsert Insert(this IDbConnection that, T1[] source) where T1 : class => GetCrud(that).Insert(source).WithConnection(that as DbConnection);
@@ -99,6 +101,7 @@ namespace FreeSql
/// 插入数据,传入实体集合
///
///
+ ///
///
///
public static IInsert Insert(this IDbConnection that, List source) where T1 : class => GetCrud(that).Insert(source).WithConnection(that as DbConnection);
@@ -106,6 +109,7 @@ namespace FreeSql
/// 插入数据,传入实体集合
///
///
+ ///
///
///
public static IInsert Insert(this IDbConnection that, IEnumerable source) where T1 : class => GetCrud(that).Insert(source).WithConnection(that as DbConnection);
@@ -125,6 +129,7 @@ namespace FreeSql
/// 注意区别:FreeSql.Repository 仓储也有 InsertOrUpdate 方法(不依赖数据库特性)
///
///
+ ///
///
public static IInsertOrUpdate InsertOrUpdate(this IDbConnection that) where T1 : class => GetCrud(that).InsertOrUpdate().WithConnection(that as DbConnection);
@@ -132,12 +137,14 @@ namespace FreeSql
/// 修改数据
///
///
+ ///
///
public static IUpdate Update(this IDbConnection that) where T1 : class => GetCrud(that).Update().WithConnection(that as DbConnection);
///
/// 修改数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
///
///
+ ///
/// 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
///
public static IUpdate Update(this IDbConnection that, object dywhere) where T1 : class => GetCrud(that).Update(dywhere).WithConnection(that as DbConnection);
@@ -146,12 +153,14 @@ namespace FreeSql
/// 查询数据
///
///
+ ///
///
public static ISelect Select(this IDbConnection that) where T1 : class => GetCrud(that).Select().WithConnection(that as DbConnection);
///
/// 查询数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
///
///
+ ///
/// 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
///
public static ISelect Select(this IDbConnection that, object dywhere) where T1 : class => GetCrud(that).Select(dywhere).WithConnection(that as DbConnection);
@@ -160,12 +169,14 @@ namespace FreeSql
/// 删除数据
///
///
+ ///
///
public static IDelete Delete(this IDbConnection that) where T1 : class => GetCrud(that).Delete().WithConnection(that as DbConnection);
///
/// 删除数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
///
///
+ ///
/// 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
///
public static IDelete Delete(this IDbConnection that, object dywhere) where T1 : class => GetCrud(that).Delete(dywhere).WithConnection(that as DbConnection);
@@ -173,54 +184,63 @@ namespace FreeSql
///
/// 多表查询
///
+ ///
///
public static ISelect Select(this IDbConnection that) where T1 : class where T2 : class =>
GetCrud(that).Select().From((s, b) => s);
///
/// 多表查询
///
+ ///
///
public static ISelect Select(this IDbConnection that) where T1 : class where T2 : class where T3 : class =>
GetCrud(that).Select().From((s, b, c) => s);
///
/// 多表查询
///
+ ///
///
public static ISelect Select(this IDbConnection that) where T1 : class where T2 : class where T3 : class where T4 : class =>
GetCrud(that).Select().From((s, b, c, d) => s);
///
/// 多表查询
///
+ ///
///
public static ISelect Select(this IDbConnection that) where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class =>
GetCrud(that).Select().From((s, b, c, d, e) => s);
///
/// 多表查询
///
+ ///
///
public static ISelect Select(this IDbConnection that) where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class =>
GetCrud(that).Select().From((s, b, c, d, e, f) => s);
///
/// 多表查询
///
+ ///
///
public static ISelect Select(this IDbConnection that) where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class where T7 : class =>
GetCrud(that).Select().From((s, b, c, d, e, f, g) => s);
///
/// 多表查询
///
+ ///
///
public static ISelect Select(this IDbConnection that) where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class where T7 : class where T8 : class =>
GetCrud(that).Select().From((s, b, c, d, e, f, g, h) => s);
///
/// 多表查询
///
+ ///
///
public static ISelect Select(this IDbConnection that) where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class where T7 : class where T8 : class where T9 : class =>
GetCrud(that).Select().From((s, b, c, d, e, f, g, h, i) => s);
///
/// 多表查询
///
+ ///
///
public static ISelect Select(this IDbConnection that) where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class where T7 : class where T8 : class where T9 : class where T10 : class =>
GetCrud(that).Select().From((s, b, c, d, e, f, g, h, i, j) => s);
@@ -237,6 +257,7 @@ namespace FreeSql
/// 插入数据,传入实体
///
///
+ ///
///
///
public static IInsert Insert(this IDbTransaction that, T1 source) where T1 : class => GetCrud(that).Insert(source).WithTransaction(that as DbTransaction);
@@ -244,6 +265,7 @@ namespace FreeSql
/// 插入数据,传入实体数组
///
///
+ ///
///
///
public static IInsert Insert(this IDbTransaction that, T1[] source) where T1 : class => GetCrud(that).Insert(source).WithTransaction(that as DbTransaction);
@@ -251,6 +273,7 @@ namespace FreeSql
/// 插入数据,传入实体集合
///
///
+ ///
///
///
public static IInsert Insert(this IDbTransaction that, List source) where T1 : class => GetCrud(that).Insert(source).WithTransaction(that as DbTransaction);
@@ -258,6 +281,7 @@ namespace FreeSql
/// 插入数据,传入实体集合
///
///
+ ///
///
///
public static IInsert Insert(this IDbTransaction that, IEnumerable source) where T1 : class => GetCrud(that).Insert(source).WithTransaction(that as DbTransaction);
@@ -276,6 +300,7 @@ namespace FreeSql
/// 注意区别:FreeSql.Repository 仓储也有 InsertOrUpdate 方法(不依赖数据库特性)
///
///
+ ///
///
public static IInsertOrUpdate InsertOrUpdate(this IDbTransaction that) where T1 : class => GetCrud(that).InsertOrUpdate().WithTransaction(that as DbTransaction);
@@ -283,12 +308,14 @@ namespace FreeSql
/// 修改数据
///
///
+ ///
///
public static IUpdate Update(this IDbTransaction that) where T1 : class => GetCrud(that).Update().WithTransaction(that as DbTransaction);
///
/// 修改数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
///
///
+ ///
/// 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
///
public static IUpdate Update(this IDbTransaction that, object dywhere) where T1 : class => GetCrud(that).Update(dywhere).WithTransaction(that as DbTransaction);
@@ -297,12 +324,14 @@ namespace FreeSql
/// 查询数据
///
///
+ ///
///
public static ISelect Select(this IDbTransaction that) where T1 : class => GetCrud(that).Select().WithTransaction(that as DbTransaction);
///
/// 查询数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
///
///
+ ///
/// 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
///
public static ISelect Select(this IDbTransaction that, object dywhere) where T1 : class => GetCrud(that).Select(dywhere).WithTransaction(that as DbTransaction);
@@ -311,12 +340,14 @@ namespace FreeSql
/// 删除数据
///
///
+ ///
///
public static IDelete Delete(this IDbTransaction that) where T1 : class => GetCrud(that).Delete().WithTransaction(that as DbTransaction);
///
/// 删除数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
///
///
+ ///
/// 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
///
public static IDelete Delete(this IDbTransaction that, object dywhere) where T1 : class => GetCrud(that).Delete(dywhere).WithTransaction(that as DbTransaction);
diff --git a/FreeSql/Extensions/FreeSqlGlobalExtensions.cs b/FreeSql/Extensions/FreeSqlGlobalExtensions.cs
index 531a8f8b..79d62f2e 100644
--- a/FreeSql/Extensions/FreeSqlGlobalExtensions.cs
+++ b/FreeSql/Extensions/FreeSqlGlobalExtensions.cs
@@ -56,6 +56,7 @@ public static partial class FreeSqlGlobalExtensions
/// 获取 Type 的原始 c# 文本表示
///
///
+ ///
///
internal static string DisplayCsharp(this Type type, bool isNameSpace = true)
{
@@ -88,14 +89,14 @@ public static partial class FreeSqlGlobalExtensions
if (genericParameters.Any() == false)
return sb.Append(type.Name).ToString();
- sb.Append(type.Name.Remove(type.Name.IndexOf('`'))).Append("<");
+ sb.Append(type.Name.Remove(type.Name.IndexOf('`'))).Append('<');
var genericTypeIndex = 0;
foreach (var genericType in genericParameters)
{
if (genericTypeIndex++ > 0) sb.Append(", ");
sb.Append(DisplayCsharp(genericType, true));
}
- return sb.Append(">").ToString();
+ return sb.Append('>').ToString();
}
internal static string DisplayCsharp(this MethodInfo method, bool isOverride)
{
@@ -109,7 +110,7 @@ public static partial class FreeSqlGlobalExtensions
if (method.IsStatic) sb.Append("static ");
if (method.IsAbstract && method.DeclaringType.IsInterface == false) sb.Append("abstract ");
if (method.IsVirtual && method.DeclaringType.IsInterface == false) sb.Append(isOverride ? "override " : "virtual ");
- sb.Append(method.ReturnType.DisplayCsharp()).Append(" ").Append(method.Name);
+ sb.Append(method.ReturnType.DisplayCsharp()).Append(' ').Append(method.Name);
var genericParameters = method.GetGenericArguments();
if (method.DeclaringType.IsNested && method.DeclaringType.DeclaringType.IsGenericType)
@@ -121,11 +122,11 @@ public static partial class FreeSqlGlobalExtensions
genericParameters = dic.Values.ToArray();
}
if (genericParameters.Any())
- sb.Append("<")
+ sb.Append('<')
.Append(string.Join(", ", genericParameters.Select(a => a.DisplayCsharp())))
- .Append(">");
+ .Append('>');
- sb.Append("(").Append(string.Join(", ", method.GetParameters().Select(a => $"{a.ParameterType.DisplayCsharp()} {a.Name}"))).Append(")");
+ sb.Append('(').Append(string.Join(", ", method.GetParameters().Select(a => $"{a.ParameterType.DisplayCsharp()} {a.Name}"))).Append(')');
return sb.ToString();
}
public static object CreateInstanceGetDefaultValue(this Type that)
@@ -283,7 +284,10 @@ public static partial class FreeSqlGlobalExtensions
/// 示例:new List<Song>(new[] { song1, song2, song3 }).IncludeMany(g.sqlite, a => a.Tags);
/// 文档:https://github.com/2881099/FreeSql/wiki/%e8%b4%aa%e5%a9%aa%e5%8a%a0%e8%bd%bd#%E5%AF%BC%E8%88%AA%E5%B1%9E%E6%80%A7-onetomanymanytomany
///
+ ///
///
+ ///
+ ///
/// 选择一个集合的导航属性,如: .IncludeMany(a => a.Tags)
/// 可以 .Where 设置临时的关系映射,如: .IncludeMany(a => a.Tags.Where(tag => tag.TypeId == a.Id))
/// 可以 .Take(5) 每个子集合只取5条,如: .IncludeMany(a => a.Tags.Take(5))
@@ -538,7 +542,7 @@ JOIN {select._commonUtils.QuoteSqlName(tb.DbName)} a ON cte_tbc.cte_id = a.{sele
.OrderBy(up, "a.cte_level desc") as Select1Provider;
var nsselsb = new StringBuilder();
- if (AdoProvider.IsFromSlave(select._select) == false) nsselsb.Append(" "); //读写分离规则,如果强制读主库,则在前面加个空格
+ if (AdoProvider.IsFromSlave(select._select) == false) nsselsb.Append(' '); //读写分离规则,如果强制读主库,则在前面加个空格
nsselsb.Append("WITH ");
switch (select._orm.Ado.DataType)
{
diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml
index 3632c4f9..5140edee 100644
--- a/FreeSql/FreeSql.xml
+++ b/FreeSql/FreeSql.xml
@@ -635,6 +635,7 @@
插入数据,传入实体
+
@@ -643,6 +644,7 @@
插入数据,传入实体数组
+
@@ -651,6 +653,7 @@
插入数据,传入实体集合
+
@@ -659,6 +662,7 @@
插入数据,传入实体集合
+
@@ -678,6 +682,7 @@
注意区别:FreeSql.Repository 仓储也有 InsertOrUpdate 方法(不依赖数据库特性)
+
@@ -685,6 +690,7 @@
修改数据
+
@@ -692,6 +698,7 @@
修改数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
+
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
@@ -700,6 +707,7 @@
查询数据
+
@@ -707,6 +715,7 @@
查询数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
+
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
@@ -715,6 +724,7 @@
删除数据
+
@@ -722,6 +732,7 @@
删除数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
+
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
@@ -729,54 +740,63 @@
多表查询
+
多表查询
+
多表查询
+
多表查询
+
多表查询
+
多表查询
+
多表查询
+
多表查询
+
多表查询
+
@@ -791,6 +811,7 @@
插入数据,传入实体
+
@@ -799,6 +820,7 @@
插入数据,传入实体数组
+
@@ -807,6 +829,7 @@
插入数据,传入实体集合
+
@@ -815,6 +838,7 @@
插入数据,传入实体集合
+
@@ -833,6 +857,7 @@
注意区别:FreeSql.Repository 仓储也有 InsertOrUpdate 方法(不依赖数据库特性)
+
@@ -840,6 +865,7 @@
修改数据
+
@@ -847,6 +873,7 @@
修改数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
+
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
@@ -855,6 +882,7 @@
查询数据
+
@@ -862,6 +890,7 @@
查询数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
+
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
@@ -870,6 +899,7 @@
删除数据
+
@@ -877,6 +907,7 @@
删除数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
+
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
@@ -2268,6 +2299,7 @@
+
lambda表达式
@@ -2471,6 +2503,7 @@
返回类型
选择列
+
@@ -2925,6 +2958,7 @@
查询,ExecuteReader(dr => {}, "select * from user where age > ?age", new { age = 25 })
提示:parms 参数还可以传 Dictionary<string, object>
+
@@ -2932,6 +2966,7 @@
查询
+
@@ -2948,6 +2983,7 @@
查询
+
@@ -2964,6 +3000,7 @@
查询
+
@@ -3035,6 +3072,7 @@
执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new SqlParameter { ParameterName = "age", Value = 25 })
+
@@ -3046,6 +3084,7 @@
提示:parms 参数还可以传 Dictionary<string, object>
+
@@ -3057,6 +3096,7 @@
Oracle: SELECT 1 FROM dual
命令超时设置(秒)
+
true: 成功, false: 失败
@@ -3067,21 +3107,26 @@
+
查询,ExecuteReaderAsync(dr => {}, "select * from user where age > ?age", new { age = 25 })
提示:parms 参数还可以传 Dictionary<string, object>
+
+
查询
+
+
@@ -3090,14 +3135,17 @@
+
查询
+
+
@@ -3106,14 +3154,17 @@
+
查询
+
+
@@ -3122,6 +3173,7 @@
+
@@ -3131,6 +3183,7 @@
+
@@ -3139,6 +3192,7 @@
+
@@ -3148,6 +3202,7 @@
+
@@ -3156,6 +3211,7 @@
+
@@ -3166,6 +3222,7 @@
+
@@ -3176,6 +3233,7 @@
+
@@ -3183,9 +3241,11 @@
执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new SqlParameter { ParameterName = "age", Value = 25 })
+
+
@@ -3194,8 +3254,10 @@
提示:parms 参数还可以传 Dictionary<string, object>
+
+
@@ -4317,6 +4379,7 @@
获取 Type 的原始 c# 文本表示
+
@@ -4347,7 +4410,10 @@
示例:new List<Song>(new[] { song1, song2, song3 }).IncludeMany(g.sqlite, a => a.Tags);
文档:https://github.com/2881099/FreeSql/wiki/%e8%b4%aa%e5%a9%aa%e5%8a%a0%e8%bd%bd#%E5%AF%BC%E8%88%AA%E5%B1%9E%E6%80%A7-onetomanymanytomany
+
+
+
选择一个集合的导航属性,如: .IncludeMany(a => a.Tags)
可以 .Where 设置临时的关系映射,如: .IncludeMany(a => a.Tags.Where(tag => tag.TypeId == a.Id))
可以 .Take(5) 每个子集合只取5条,如: .IncludeMany(a => a.Tags.Take(5))
diff --git a/FreeSql/Interface/Curd/ISelect/ISelect1.cs b/FreeSql/Interface/Curd/ISelect/ISelect1.cs
index 4bff2524..d2537fcb 100644
--- a/FreeSql/Interface/Curd/ISelect/ISelect1.cs
+++ b/FreeSql/Interface/Curd/ISelect/ISelect1.cs
@@ -242,6 +242,7 @@ namespace FreeSql
///
///
///
+ ///
/// lambda表达式
///
ISelect Where(Expression> exp) where T2 : class where T3 : class where T4 : class where T5 : class;
diff --git a/FreeSql/Interface/Curd/ISelect/ISelectGrouping.cs b/FreeSql/Interface/Curd/ISelect/ISelectGrouping.cs
index 1e311a29..295b7411 100644
--- a/FreeSql/Interface/Curd/ISelect/ISelectGrouping.cs
+++ b/FreeSql/Interface/Curd/ISelect/ISelectGrouping.cs
@@ -57,6 +57,7 @@ namespace FreeSql
///
/// 返回类型
/// 选择列
+ ///
///
string ToSql(Expression, TReturn>> select, FieldAliasOptions fieldAlias = FieldAliasOptions.AsIndex);
///
diff --git a/FreeSql/Interface/IAdo.cs b/FreeSql/Interface/IAdo.cs
index 7e8f53f1..56855659 100644
--- a/FreeSql/Interface/IAdo.cs
+++ b/FreeSql/Interface/IAdo.cs
@@ -101,6 +101,7 @@ namespace FreeSql
/// 查询,ExecuteReader(dr => {}, "select * from user where age > ?age", new { age = 25 })
/// 提示:parms 参数还可以传 Dictionary<string, object>
///
+ ///
///
///
void ExecuteReader(Action> fetchHandler, string cmdText, object parms = null);
@@ -109,6 +110,7 @@ namespace FreeSql
///
/// 查询
///
+ ///
///
///
object[][] ExecuteArray(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
@@ -127,6 +129,7 @@ namespace FreeSql
///
/// 查询
///
+ ///
///
///
DataSet ExecuteDataSet(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
@@ -145,6 +148,7 @@ namespace FreeSql
///
/// 查询
///
+ ///
///
///
DataTable ExecuteDataTable(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
@@ -227,6 +231,7 @@ namespace FreeSql
/// 执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new SqlParameter { ParameterName = "age", Value = 25 })
///
///
+ ///
///
///
///
@@ -239,6 +244,7 @@ namespace FreeSql
/// 提示:parms 参数还可以传 Dictionary<string, object>
///
///
+ ///
///
///
///
@@ -274,6 +280,7 @@ namespace FreeSql
/// Oracle: SELECT 1 FROM dual
///
/// 命令超时设置(秒)
+ ///
/// true: 成功, false: 失败
Task ExecuteConnectTestAsync(int commandTimeout = 0, CancellationToken cancellationToken = default);
@@ -284,6 +291,7 @@ namespace FreeSql
///
///
///
+ ///
Task ExecuteReaderAsync(Func, Task> readerHander, CommandType cmdType, string cmdText, DbParameter[] cmdParms, CancellationToken cancellationToken = default);
Task ExecuteReaderAsync(DbTransaction transaction, Func, Task> readerHander, CommandType cmdType, string cmdText, DbParameter[] cmdParms, CancellationToken cancellationToken = default);
Task ExecuteReaderAsync(DbConnection connection, DbTransaction transaction, Func, Task> readerHander, CommandType cmdType, string cmdText, int cmdTimeout, DbParameter[] cmdParms, CancellationToken cancellationToken = default);
@@ -291,16 +299,20 @@ namespace FreeSql
/// 查询,ExecuteReaderAsync(dr => {}, "select * from user where age > ?age", new { age = 25 })
/// 提示:parms 参数还可以传 Dictionary<string, object>
///
+ ///
///
///
+ ///
Task ExecuteReaderAsync(Func, Task> readerHander, string cmdText, object parms = null, CancellationToken cancellationToken = default);
Task ExecuteReaderAsync(DbTransaction transaction, Func, Task> readerHander, string cmdText, object parms = null, CancellationToken cancellationToken = default);
Task ExecuteReaderAsync(DbConnection connection, DbTransaction transaction, Func, Task> readerHander, string cmdText, object parms = null, CancellationToken cancellationToken = default);
///
/// 查询
///
+ ///
///
///
+ ///
Task