mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 调整 移除对 System.ValueType 的依赖,减少版本冲突问题;(目前 FreeSql.dll 无任何公用库依赖)
This commit is contained in:
		@@ -13,6 +13,18 @@ namespace FreeSql.DatabaseModel
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// 枚举项
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public List<(string label, string value)> Labels { get; set; }
 | 
			
		||||
        public List<LabelInfo> Labels { get; set; }
 | 
			
		||||
 | 
			
		||||
        public class LabelInfo
 | 
			
		||||
        {
 | 
			
		||||
            public string label { get; }
 | 
			
		||||
            public string value { get; }
 | 
			
		||||
 | 
			
		||||
            public LabelInfo(string label, string value)
 | 
			
		||||
            {
 | 
			
		||||
                this.label = label;
 | 
			
		||||
                this.value = value;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -51,6 +51,7 @@ public static class FreeSqlGlobalExpressionCall
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
#if netcoreapp
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// C#:从元组集合中查找 exp1, exp2 是否存在<para></para>
 | 
			
		||||
    /// SQL: <para></para>
 | 
			
		||||
@@ -127,4 +128,5 @@ public static class FreeSqlGlobalExpressionCall
 | 
			
		||||
        expContext.Value.Result = sb.ToString();
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<Project Sdk="Microsoft.NET.Sdk">
 | 
			
		||||
 | 
			
		||||
	<PropertyGroup>
 | 
			
		||||
		<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
 | 
			
		||||
		<TargetFrameworks>netstandard2.0;netcoreapp31;netcoreapp30;netcoreapp22;netcoreapp21;net45;net40</TargetFrameworks>
 | 
			
		||||
		<Version>1.3.0-preview4</Version>
 | 
			
		||||
		<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
 | 
			
		||||
		<Authors>YeXiangQin</Authors>
 | 
			
		||||
@@ -32,9 +32,11 @@
 | 
			
		||||
 | 
			
		||||
	<ItemGroup>
 | 
			
		||||
	  <PackageReference Include="SafeObjectPool" Version="2.3.1" />
 | 
			
		||||
	  <PackageReference Include="System.ValueTuple" Version="4.5.0" />
 | 
			
		||||
	</ItemGroup>
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp31' or '$(TargetFramework)' == 'netcoreapp30' or '$(TargetFramework)' == 'netcoreapp22' or '$(TargetFramework)' == 'netcoreapp21'">
 | 
			
		||||
    <DefineConstants>netcoreapp</DefineConstants>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <PropertyGroup Condition="'$(TargetFramework)' == 'net40'">
 | 
			
		||||
    <DefineConstants>net40</DefineConstants>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
 
 | 
			
		||||
@@ -2260,137 +2260,6 @@
 | 
			
		||||
            <param name="parms"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.ExecuteReaderAsync(System.Func{System.Data.Common.DbDataReader,System.Threading.Tasks.Task},System.Data.CommandType,System.String,System.Data.Common.DbParameter[])">
 | 
			
		||||
            <summary>
 | 
			
		||||
            查询,若使用读写分离,查询【从库】条件cmdText.StartsWith("SELECT "),否则查询【主库】
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="readerHander"></param>
 | 
			
		||||
            <param name="cmdType"></param>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="cmdParms"></param>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.ExecuteReaderAsync(System.Func{System.Data.Common.DbDataReader,System.Threading.Tasks.Task},System.String,System.Object)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            查询,ExecuteReaderAsync(dr => {}, "select * from user where age > ?age", new { age = 25 })
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="parms"></param>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.ExecuteArrayAsync(System.Data.CommandType,System.String,System.Data.Common.DbParameter[])">
 | 
			
		||||
            <summary>
 | 
			
		||||
            查询
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="cmdParms"></param>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.ExecuteArrayAsync(System.String,System.Object)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            查询,ExecuteArrayAsync("select * from user where age > ?age", new { age = 25 })
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="parms"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.ExecuteDataSetAsync(System.Data.CommandType,System.String,System.Data.Common.DbParameter[])">
 | 
			
		||||
            <summary>
 | 
			
		||||
            查询
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="cmdParms"></param>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.ExecuteDataSetAsync(System.String,System.Object)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            查询,ExecuteDataSetAsync("select * from user where age > ?age; select 2", new { age = 25 })
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="parms"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.ExecuteDataTableAsync(System.Data.CommandType,System.String,System.Data.Common.DbParameter[])">
 | 
			
		||||
            <summary>
 | 
			
		||||
            查询
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="cmdParms"></param>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.ExecuteDataTableAsync(System.String,System.Object)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            查询,ExecuteDataTableAsync("select * from user where age > ?age", new { age = 25 })
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="parms"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.ExecuteNonQueryAsync(System.Data.CommandType,System.String,System.Data.Common.DbParameter[])">
 | 
			
		||||
            <summary>
 | 
			
		||||
            在【主库】执行
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="cmdType"></param>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="cmdParms"></param>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.ExecuteNonQueryAsync(System.String,System.Object)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            在【主库】执行,ExecuteNonQueryAsync("delete from user where age > ?age", new { age = 25 })
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="parms"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.ExecuteScalarAsync(System.Data.CommandType,System.String,System.Data.Common.DbParameter[])">
 | 
			
		||||
            <summary>
 | 
			
		||||
            在【主库】执行
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="cmdType"></param>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="cmdParms"></param>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.ExecuteScalarAsync(System.String,System.Object)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            在【主库】执行,ExecuteScalarAsync("select 1 from user where age > ?age", new { age = 25 })
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="parms"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.QueryAsync``1(System.Data.CommandType,System.String,System.Data.Common.DbParameter[])">
 | 
			
		||||
            <summary>
 | 
			
		||||
            执行SQL返回对象集合,QueryAsync<User>("select * from user where age > ?age", new SqlParameter { ParameterName = "age", Value = 25 })
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T"></typeparam>
 | 
			
		||||
            <param name="cmdType"></param>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="cmdParms"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.QueryAsync``1(System.String,System.Object)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            执行SQL返回对象集合,QueryAsync<User>("select * from user where age > ?age", new { age = 25 })
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T"></typeparam>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="parms"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.QueryAsync``2(System.Data.CommandType,System.String,System.Data.Common.DbParameter[])">
 | 
			
		||||
            <summary>
 | 
			
		||||
            执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new SqlParameter { ParameterName = "age", Value = 25 })
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <param name="cmdType"></param>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="cmdParms"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.QueryAsync``2(System.String,System.Object)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new { age = 25 })
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <param name="cmdText"></param>
 | 
			
		||||
            <param name="parms"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="E:FreeSql.IAop.ParseExpression">
 | 
			
		||||
            <summary>
 | 
			
		||||
            可自定义解析表达式
 | 
			
		||||
@@ -2945,40 +2814,6 @@
 | 
			
		||||
            <param name="end"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSqlGlobalExpressionCall.Contains``2(System.Collections.Generic.IEnumerable{System.ValueTuple{``0,``1}},``0,``1)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            C#:从元组集合中查找 exp1, exp2 是否存在<para></para>
 | 
			
		||||
            SQL: <para></para>
 | 
			
		||||
            exp1 = that[0].Item1 and exp2 = that[0].Item2 OR <para></para>
 | 
			
		||||
            exp1 = that[1].Item1 and exp2 = that[1].Item2 OR <para></para>
 | 
			
		||||
            ... <para></para>
 | 
			
		||||
            注意:当 that 为 null 或 empty 时,返回 1=0
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <typeparam name="T2"></typeparam>
 | 
			
		||||
            <param name="that"></param>
 | 
			
		||||
            <param name="exp1"></param>
 | 
			
		||||
            <param name="exp2"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSqlGlobalExpressionCall.Contains``3(System.Collections.Generic.IEnumerable{System.ValueTuple{``0,``1,``2}},``0,``1,``2)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            C#:从元组集合中查找 exp1, exp2, exp2 是否存在<para></para>
 | 
			
		||||
            SQL: <para></para>
 | 
			
		||||
            exp1 = that[0].Item1 and exp2 = that[0].Item2 and exp3 = that[0].Item3 OR <para></para>
 | 
			
		||||
            exp1 = that[1].Item1 and exp2 = that[1].Item2 and exp3 = that[1].Item3 OR <para></para>
 | 
			
		||||
            ... <para></para>
 | 
			
		||||
            注意:当 that 为 null 或 empty 时,返回 1=0
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <typeparam name="T2"></typeparam>
 | 
			
		||||
            <typeparam name="T3"></typeparam>
 | 
			
		||||
            <param name="that"></param>
 | 
			
		||||
            <param name="exp1"></param>
 | 
			
		||||
            <param name="exp2"></param>
 | 
			
		||||
            <param name="exp3"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSqlGlobalExtensions.Distance(System.Drawing.Point,System.Drawing.Point)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            测量两个经纬度的距离,返回单位:米
 | 
			
		||||
@@ -3243,3 +3078,188 @@
 | 
			
		||||
        </member>
 | 
			
		||||
    </members>
 | 
			
		||||
</doc>
 | 
			
		||||
.IncludeMany(a => a.Tags.Take(5))<para></para>
 | 
			
		||||
            可以 .Select 设置只查询部分字段,如: (a => new TNavigate { Title = a.Title }) 
 | 
			
		||||
            </param>
 | 
			
		||||
            <param name="then">即能 ThenInclude,还可以二次过滤(这个 EFCore 做不到?)</param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:System.Linq.Expressions.LambadaExpressionExtensions.And``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
 | 
			
		||||
            <summary>
 | 
			
		||||
            使用 and 拼接两个 lambda 表达式
 | 
			
		||||
            </summary>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:System.Linq.Expressions.LambadaExpressionExtensions.And``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},System.Boolean,System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
 | 
			
		||||
            <summary>
 | 
			
		||||
            使用 and 拼接两个 lambda 表达式
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T"></typeparam>
 | 
			
		||||
            <param name="exp1"></param>
 | 
			
		||||
            <param name="condition">true 时生效</param>
 | 
			
		||||
            <param name="exp2"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Or``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
 | 
			
		||||
            <summary>
 | 
			
		||||
            使用 or 拼接两个 lambda 表达式
 | 
			
		||||
            </summary>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Or``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},System.Boolean,System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
 | 
			
		||||
            <summary>
 | 
			
		||||
            使用 or 拼接两个 lambda 表达式
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T"></typeparam>
 | 
			
		||||
            <param name="exp1"></param>
 | 
			
		||||
            <param name="condition">true 时生效</param>
 | 
			
		||||
            <param name="exp2"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Not``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},System.Boolean)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            将 lambda 表达式取反
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T"></typeparam>
 | 
			
		||||
            <param name="exp"></param>
 | 
			
		||||
            <param name="condition">true 时生效</param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeUtil.NewMongodbId">
 | 
			
		||||
            <summary>
 | 
			
		||||
            生成类似Mongodb的ObjectId有序、不重复Guid
 | 
			
		||||
            </summary>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Insert``1">
 | 
			
		||||
            <summary>
 | 
			
		||||
            插入数据
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Insert``1(``0)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            插入数据,传入实体
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <param name="source"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Insert``1(``0[])">
 | 
			
		||||
            <summary>
 | 
			
		||||
            插入数据,传入实体数组
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <param name="source"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Insert``1(System.Collections.Generic.List{``0})">
 | 
			
		||||
            <summary>
 | 
			
		||||
            插入数据,传入实体集合
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <param name="source"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Insert``1(System.Collections.Generic.IEnumerable{``0})">
 | 
			
		||||
            <summary>
 | 
			
		||||
            插入数据,传入实体集合
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <param name="source"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Update``1">
 | 
			
		||||
            <summary>
 | 
			
		||||
            修改数据
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Update``1(System.Object)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            修改数据,传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <param name="dywhere">主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合</param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Select``1">
 | 
			
		||||
            <summary>
 | 
			
		||||
            查询数据
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Select``1(System.Object)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            查询数据,传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <param name="dywhere">主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合</param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Delete``1">
 | 
			
		||||
            <summary>
 | 
			
		||||
            删除数据
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Delete``1(System.Object)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            删除数据,传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
 | 
			
		||||
            </summary>
 | 
			
		||||
            <typeparam name="T1"></typeparam>
 | 
			
		||||
            <param name="dywhere">主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合</param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Transaction(System.Action)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            开启事务(不支持异步),60秒未执行完成(可能)被其他线程事务自动提交
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="handler">事务体 () => {}</param>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Transaction(System.TimeSpan,System.Action)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            开启事务(不支持异步)
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="timeout">超时,未执行完成(可能)被其他线程事务自动提交</param>
 | 
			
		||||
            <param name="handler">事务体 () => {}</param>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IFreeSql.Transaction(System.Data.IsolationLevel,System.TimeSpan,System.Action)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            开启事务(不支持异步)
 | 
			
		||||
            </summary>
 | 
			
		||||
            <param name="isolationLevel"></param>
 | 
			
		||||
            <param name="handler">事务体 () => {}</param>
 | 
			
		||||
            <param name="timeout">超时,未执行完成(可能)被其他线程事务自动提交</param>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="P:IFreeSql.Ado">
 | 
			
		||||
            <summary>
 | 
			
		||||
            数据库访问对象
 | 
			
		||||
            </summary>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="P:IFreeSql.Aop">
 | 
			
		||||
            <summary>
 | 
			
		||||
            所有拦截方法都在这里
 | 
			
		||||
            </summary>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="P:IFreeSql.CodeFirst">
 | 
			
		||||
            <summary>
 | 
			
		||||
            CodeFirst 模式开发相关方法
 | 
			
		||||
            </summary>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="P:IFreeSql.DbFirst">
 | 
			
		||||
            <summary>
 | 
			
		||||
            DbFirst 模式开发相关方法
 | 
			
		||||
            </summary>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="P:IFreeSql.GlobalFilter">
 | 
			
		||||
            <summary>
 | 
			
		||||
            全局过滤设置,可默认附加为 Select/Update/Delete 条件
 | 
			
		||||
            </summary>
 | 
			
		||||
        </member>
 | 
			
		||||
    </members>
 | 
			
		||||
</doc>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
using System;
 | 
			
		||||
using FreeSql.Internal.Model;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Data;
 | 
			
		||||
using System.Linq.Expressions;
 | 
			
		||||
@@ -50,7 +51,7 @@ namespace FreeSql
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Where(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> exp);
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> WhereIf(bool condition, Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TKey>> exp);
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TKey>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> OrderBy<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TMember>> column);
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> OrderByDescending<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TMember>> column);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
using System;
 | 
			
		||||
using FreeSql.Internal.Model;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Data;
 | 
			
		||||
using System.Linq.Expressions;
 | 
			
		||||
@@ -50,7 +51,7 @@ namespace FreeSql
 | 
			
		||||
        ISelect<T1, T2> Where(Expression<Func<T1, T2, bool>> exp);
 | 
			
		||||
        ISelect<T1, T2> WhereIf(bool condition, Expression<Func<T1, T2, bool>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2)> GroupBy<TKey>(Expression<Func<T1, T2, TKey>> exp);
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2>> GroupBy<TKey>(Expression<Func<T1, T2, TKey>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelect<T1, T2> OrderBy<TMember>(Expression<Func<T1, T2, TMember>> column);
 | 
			
		||||
        ISelect<T1, T2> OrderByDescending<TMember>(Expression<Func<T1, T2, TMember>> column);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
using System;
 | 
			
		||||
using FreeSql.Internal.Model;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Data;
 | 
			
		||||
using System.Linq.Expressions;
 | 
			
		||||
@@ -50,7 +51,7 @@ namespace FreeSql
 | 
			
		||||
        ISelect<T1, T2, T3> Where(Expression<Func<T1, T2, T3, bool>> exp);
 | 
			
		||||
        ISelect<T1, T2, T3> WhereIf(bool condition, Expression<Func<T1, T2, T3, bool>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3)> GroupBy<TKey>(Expression<Func<T1, T2, T3, TKey>> exp);
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3>> GroupBy<TKey>(Expression<Func<T1, T2, T3, TKey>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelect<T1, T2, T3> OrderBy<TMember>(Expression<Func<T1, T2, T3, TMember>> column);
 | 
			
		||||
        ISelect<T1, T2, T3> OrderByDescending<TMember>(Expression<Func<T1, T2, T3, TMember>> column);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
using System;
 | 
			
		||||
using FreeSql.Internal.Model;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Data;
 | 
			
		||||
using System.Linq.Expressions;
 | 
			
		||||
@@ -50,7 +51,7 @@ namespace FreeSql
 | 
			
		||||
        ISelect<T1, T2, T3, T4> Where(Expression<Func<T1, T2, T3, T4, bool>> exp);
 | 
			
		||||
        ISelect<T1, T2, T3, T4> WhereIf(bool condition, Expression<Func<T1, T2, T3, T4, bool>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4)> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, TKey>> exp);
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4>> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, TKey>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelect<T1, T2, T3, T4> OrderBy<TMember>(Expression<Func<T1, T2, T3, T4, TMember>> column);
 | 
			
		||||
        ISelect<T1, T2, T3, T4> OrderByDescending<TMember>(Expression<Func<T1, T2, T3, T4, TMember>> column);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
using System;
 | 
			
		||||
using FreeSql.Internal.Model;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Data;
 | 
			
		||||
using System.Linq.Expressions;
 | 
			
		||||
@@ -50,7 +51,7 @@ namespace FreeSql
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5> Where(Expression<Func<T1, T2, T3, T4, T5, bool>> exp);
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5> WhereIf(bool condition, Expression<Func<T1, T2, T3, T4, T5, bool>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4, T5)> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, TKey>> exp);
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4, T5>> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, TKey>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5> OrderBy<TMember>(Expression<Func<T1, T2, T3, T4, T5, TMember>> column);
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5> OrderByDescending<TMember>(Expression<Func<T1, T2, T3, T4, T5, TMember>> column);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
using System;
 | 
			
		||||
using FreeSql.Internal.Model;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Data;
 | 
			
		||||
using System.Linq.Expressions;
 | 
			
		||||
@@ -50,7 +51,7 @@ namespace FreeSql
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6> Where(Expression<Func<T1, T2, T3, T4, T5, T6, bool>> exp);
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6> WhereIf(bool condition, Expression<Func<T1, T2, T3, T4, T5, T6, bool>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4, T5, T6)> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, TKey>> exp);
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6>> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, TKey>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6> OrderBy<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, TMember>> column);
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6> OrderByDescending<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, TMember>> column);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
using System;
 | 
			
		||||
using FreeSql.Internal.Model;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Data;
 | 
			
		||||
using System.Linq.Expressions;
 | 
			
		||||
@@ -50,7 +51,7 @@ namespace FreeSql
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7> Where(Expression<Func<T1, T2, T3, T4, T5, T6, T7, bool>> exp);
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7> WhereIf(bool condition, Expression<Func<T1, T2, T3, T4, T5, T6, T7, bool>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4, T5, T6, T7)> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TKey>> exp);
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7>> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TKey>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7> OrderBy<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TMember>> column);
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7> OrderByDescending<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TMember>> column);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
using System;
 | 
			
		||||
using FreeSql.Internal.Model;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Data;
 | 
			
		||||
using System.Linq.Expressions;
 | 
			
		||||
@@ -50,7 +51,7 @@ namespace FreeSql
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7, T8> Where(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, bool>> exp);
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7, T8> WhereIf(bool condition, Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, bool>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4, T5, T6, T7, T8)> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TKey>> exp);
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8>> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TKey>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7, T8> OrderBy<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TMember>> column);
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7, T8> OrderByDescending<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TMember>> column);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
using System;
 | 
			
		||||
using FreeSql.Internal.Model;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Data;
 | 
			
		||||
using System.Linq.Expressions;
 | 
			
		||||
@@ -50,7 +51,7 @@ namespace FreeSql
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> Where(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, bool>> exp);
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> WhereIf(bool condition, Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, bool>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4, T5, T6, T7, T8, T9)> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TKey>> exp);
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>> GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TKey>> exp);
 | 
			
		||||
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> OrderBy<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TMember>> column);
 | 
			
		||||
        ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> OrderByDescending<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TMember>> column);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
using FreeSql.DatabaseModel;
 | 
			
		||||
using FreeSql.Internal.Model;
 | 
			
		||||
using SafeObjectPool;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
@@ -185,9 +186,9 @@ namespace FreeSql
 | 
			
		||||
        /// <param name="cmdText"></param>
 | 
			
		||||
        /// <param name="cmdParms"></param>
 | 
			
		||||
        /// <returns></returns>
 | 
			
		||||
        (List<T1>, List<T2>) Query<T1, T2>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        (List<T1>, List<T2>) Query<T1, T2>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        (List<T1>, List<T2>) Query<T1, T2>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>> Query<T1, T2>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>> Query<T1, T2>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>> Query<T1, T2>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// 执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new { age = 25 })
 | 
			
		||||
        /// </summary>
 | 
			
		||||
@@ -195,28 +196,28 @@ namespace FreeSql
 | 
			
		||||
        /// <param name="cmdText"></param>
 | 
			
		||||
        /// <param name="parms"></param>
 | 
			
		||||
        /// <returns></returns>
 | 
			
		||||
        (List<T1>, List<T2>) Query<T1, T2>(string cmdText, object parms = null);
 | 
			
		||||
        (List<T1>, List<T2>) Query<T1, T2>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        (List<T1>, List<T2>) Query<T1, T2>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>> Query<T1, T2>(string cmdText, object parms = null);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>> Query<T1, T2>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>> Query<T1, T2>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>) Query<T1, T2, T3>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>) Query<T1, T2, T3>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>) Query<T1, T2, T3>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>) Query<T1, T2, T3>(string cmdText, object parms = null);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>) Query<T1, T2, T3>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>) Query<T1, T2, T3>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>, List<T4>) Query<T1, T2, T3, T4>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>, List<T4>) Query<T1, T2, T3, T4>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>, List<T4>) Query<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>, List<T4>) Query<T1, T2, T3, T4>(string cmdText, object parms = null);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>, List<T4>) Query<T1, T2, T3, T4>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>, List<T4>) Query<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>, List<T4>, List<T5>) Query<T1, T2, T3, T4, T5>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>, List<T4>, List<T5>) Query<T1, T2, T3, T4, T5>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>, List<T4>, List<T5>) Query<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>, List<T4>, List<T5>) Query<T1, T2, T3, T4, T5>(string cmdText, object parms = null);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>, List<T4>, List<T5>) Query<T1, T2, T3, T4, T5>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        (List<T1>, List<T2>, List<T3>, List<T4>, List<T5>) Query<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>> Query<T1, T2, T3>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>> Query<T1, T2, T3>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>> Query<T1, T2, T3>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>> Query<T1, T2, T3>(string cmdText, object parms = null);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>> Query<T1, T2, T3>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>> Query<T1, T2, T3>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>> Query<T1, T2, T3, T4>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>> Query<T1, T2, T3, T4>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>> Query<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>> Query<T1, T2, T3, T4>(string cmdText, object parms = null);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>> Query<T1, T2, T3, T4>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>> Query<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>> Query<T1, T2, T3, T4, T5>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>> Query<T1, T2, T3, T4, T5>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>> Query<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>> Query<T1, T2, T3, T4, T5>(string cmdText, object parms = null);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>> Query<T1, T2, T3, T4, T5>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>> Query<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
 | 
			
		||||
#if net40
 | 
			
		||||
#else
 | 
			
		||||
@@ -357,9 +358,9 @@ namespace FreeSql
 | 
			
		||||
        /// <param name="cmdText"></param>
 | 
			
		||||
        /// <param name="cmdParms"></param>
 | 
			
		||||
        /// <returns></returns>
 | 
			
		||||
        Task<(List<T1>, List<T2>)> QueryAsync<T1, T2>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<(List<T1>, List<T2>)> QueryAsync<T1, T2>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<(List<T1>, List<T2>)> QueryAsync<T1, T2>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>>> QueryAsync<T1, T2>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>>> QueryAsync<T1, T2>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>>> QueryAsync<T1, T2>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// 执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new { age = 25 })
 | 
			
		||||
        /// </summary>
 | 
			
		||||
@@ -367,28 +368,28 @@ namespace FreeSql
 | 
			
		||||
        /// <param name="cmdText"></param>
 | 
			
		||||
        /// <param name="parms"></param>
 | 
			
		||||
        /// <returns></returns>
 | 
			
		||||
        Task<(List<T1>, List<T2>)> QueryAsync<T1, T2>(string cmdText, object parms = null);
 | 
			
		||||
        Task<(List<T1>, List<T2>)> QueryAsync<T1, T2>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<(List<T1>, List<T2>)> QueryAsync<T1, T2>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>>> QueryAsync<T1, T2>(string cmdText, object parms = null);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>>> QueryAsync<T1, T2>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>>> QueryAsync<T1, T2>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>)> QueryAsync<T1, T2, T3>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>)> QueryAsync<T1, T2, T3>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>)> QueryAsync<T1, T2, T3>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>)> QueryAsync<T1, T2, T3>(string cmdText, object parms = null);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>)> QueryAsync<T1, T2, T3>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>)> QueryAsync<T1, T2, T3>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>, List<T4>)> QueryAsync<T1, T2, T3, T4>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>, List<T4>)> QueryAsync<T1, T2, T3, T4>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>, List<T4>)> QueryAsync<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>, List<T4>)> QueryAsync<T1, T2, T3, T4>(string cmdText, object parms = null);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>, List<T4>)> QueryAsync<T1, T2, T3, T4>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>, List<T4>)> QueryAsync<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>, List<T4>, List<T5>)> QueryAsync<T1, T2, T3, T4, T5>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>, List<T4>, List<T5>)> QueryAsync<T1, T2, T3, T4, T5>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>, List<T4>, List<T5>)> QueryAsync<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>, List<T4>, List<T5>)> QueryAsync<T1, T2, T3, T4, T5>(string cmdText, object parms = null);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>, List<T4>, List<T5>)> QueryAsync<T1, T2, T3, T4, T5>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<(List<T1>, List<T2>, List<T3>, List<T4>, List<T5>)> QueryAsync<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>>> QueryAsync<T1, T2, T3>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>>> QueryAsync<T1, T2, T3>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>>> QueryAsync<T1, T2, T3>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>>> QueryAsync<T1, T2, T3>(string cmdText, object parms = null);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>>> QueryAsync<T1, T2, T3>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>>> QueryAsync<T1, T2, T3>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>>> QueryAsync<T1, T2, T3, T4>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>>> QueryAsync<T1, T2, T3, T4>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>>> QueryAsync<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>>> QueryAsync<T1, T2, T3, T4>(string cmdText, object parms = null);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>>> QueryAsync<T1, T2, T3, T4>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>>> QueryAsync<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>>> QueryAsync<T1, T2, T3, T4, T5>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>>> QueryAsync<T1, T2, T3, T4, T5>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>>> QueryAsync<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>>> QueryAsync<T1, T2, T3, T4, T5>(string cmdText, object parms = null);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>>> QueryAsync<T1, T2, T3, T4, T5>(DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>>> QueryAsync<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null);
 | 
			
		||||
        #endregion
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -87,7 +87,7 @@ namespace FreeSql
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="type"></param>
 | 
			
		||||
        /// <returns></returns>
 | 
			
		||||
        (int type, string dbtype, string dbtypeFull, bool? isnullable, object defaultValue)? GetDbInfo(Type type);
 | 
			
		||||
        DbInfoResult GetDbInfo(Type type);
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// 在外部配置实体的特性
 | 
			
		||||
        /// </summary>
 | 
			
		||||
 
 | 
			
		||||
@@ -8,6 +8,7 @@ using System.Diagnostics;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Reflection;
 | 
			
		||||
using FreeSql.Internal.Model;
 | 
			
		||||
 | 
			
		||||
namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
{
 | 
			
		||||
@@ -33,7 +34,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            this.DataType = dataType;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        void LoggerException(IObjectPool<DbConnection> pool, (Aop.CommandBeforeEventArgs before, DbCommand cmd, bool isclose) pc, Exception ex, DateTime dt, StringBuilder logtxt, bool isThrowException = true)
 | 
			
		||||
        void LoggerException(IObjectPool<DbConnection> pool, PrepareCommandResult pc, Exception ex, DateTime dt, StringBuilder logtxt, bool isThrowException = true)
 | 
			
		||||
        {
 | 
			
		||||
            var cmd = pc.cmd;
 | 
			
		||||
            if (pc.isclose) pc.cmd.Connection.Close();
 | 
			
		||||
@@ -121,14 +122,14 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return ret;
 | 
			
		||||
        }
 | 
			
		||||
        #region query multi
 | 
			
		||||
        public (List<T1>, List<T2>) Query<T1, T2>(string cmdText, object parms = null) => Query<T1, T2>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public (List<T1>, List<T2>) Query<T1, T2>(DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public (List<T1>, List<T2>) Query<T1, T2>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public (List<T1>, List<T2>) Query<T1, T2>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public (List<T1>, List<T2>) Query<T1, T2>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public (List<T1>, List<T2>) Query<T1, T2>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>> Query<T1, T2>(string cmdText, object parms = null) => Query<T1, T2>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>> Query<T1, T2>(DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>> Query<T1, T2>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>> Query<T1, T2>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>> Query<T1, T2>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>> Query<T1, T2>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        {
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return (new List<T1>(), new List<T2>());
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return NaviteTuple.Create(new List<T1>(), new List<T2>());
 | 
			
		||||
            var ret1 = new List<T1>();
 | 
			
		||||
            var type1 = typeof(T1);
 | 
			
		||||
            string flag1 = null;
 | 
			
		||||
@@ -180,17 +181,17 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                        break;
 | 
			
		||||
                }
 | 
			
		||||
            }, cmdType, cmdText, cmdParms);
 | 
			
		||||
            return (ret1, ret2);
 | 
			
		||||
            return NaviteTuple.Create(ret1, ret2);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>) Query<T1, T2, T3>(string cmdText, object parms = null) => Query<T1, T2, T3>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>) Query<T1, T2, T3>(DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2, T3>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>) Query<T1, T2, T3>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2, T3>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>) Query<T1, T2, T3>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2, T3>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>) Query<T1, T2, T3>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2, T3>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>) Query<T1, T2, T3>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>> Query<T1, T2, T3>(string cmdText, object parms = null) => Query<T1, T2, T3>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>> Query<T1, T2, T3>(DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2, T3>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>> Query<T1, T2, T3>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2, T3>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>> Query<T1, T2, T3>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2, T3>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>> Query<T1, T2, T3>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2, T3>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>> Query<T1, T2, T3>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        {
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return (new List<T1>(), new List<T2>(), new List<T3>());
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return NaviteTuple.Create(new List<T1>(), new List<T2>(), new List<T3>());
 | 
			
		||||
            var ret1 = new List<T1>();
 | 
			
		||||
            var type1 = typeof(T1);
 | 
			
		||||
            string flag1 = null;
 | 
			
		||||
@@ -265,17 +266,17 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                        break;
 | 
			
		||||
                }
 | 
			
		||||
            }, cmdType, cmdText, cmdParms);
 | 
			
		||||
            return (ret1, ret2, ret3);
 | 
			
		||||
            return NaviteTuple.Create(ret1, ret2, ret3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>, List<T4>) Query<T1, T2, T3, T4>(string cmdText, object parms = null) => Query<T1, T2, T3, T4>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>, List<T4>) Query<T1, T2, T3, T4>(DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2, T3, T4>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>, List<T4>) Query<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2, T3, T4>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>, List<T4>) Query<T1, T2, T3, T4>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2, T3, T4>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>, List<T4>) Query<T1, T2, T3, T4>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2, T3, T4>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>, List<T4>) Query<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>> Query<T1, T2, T3, T4>(string cmdText, object parms = null) => Query<T1, T2, T3, T4>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>> Query<T1, T2, T3, T4>(DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2, T3, T4>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>> Query<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2, T3, T4>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>> Query<T1, T2, T3, T4>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2, T3, T4>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>> Query<T1, T2, T3, T4>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2, T3, T4>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>> Query<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        {
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return (new List<T1>(), new List<T2>(), new List<T3>(), new List<T4>());
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return NaviteTuple.Create(new List<T1>(), new List<T2>(), new List<T3>(), new List<T4>());
 | 
			
		||||
            var ret1 = new List<T1>();
 | 
			
		||||
            var type1 = typeof(T1);
 | 
			
		||||
            string flag1 = null;
 | 
			
		||||
@@ -373,17 +374,17 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                        break;
 | 
			
		||||
                }
 | 
			
		||||
            }, cmdType, cmdText, cmdParms);
 | 
			
		||||
            return (ret1, ret2, ret3, ret4);
 | 
			
		||||
            return NaviteTuple.Create(ret1, ret2, ret3, ret4);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>, List<T4>, List<T5>) Query<T1, T2, T3, T4, T5>(string cmdText, object parms = null) => Query<T1, T2, T3, T4, T5>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>, List<T4>, List<T5>) Query<T1, T2, T3, T4, T5>(DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2, T3, T4, T5>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>, List<T4>, List<T5>) Query<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2, T3, T4, T5>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>, List<T4>, List<T5>) Query<T1, T2, T3, T4, T5>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2, T3, T4, T5>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>, List<T4>, List<T5>) Query<T1, T2, T3, T4, T5>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2, T3, T4, T5>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public (List<T1>, List<T2>, List<T3>, List<T4>, List<T5>) Query<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>> Query<T1, T2, T3, T4, T5>(string cmdText, object parms = null) => Query<T1, T2, T3, T4, T5>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>> Query<T1, T2, T3, T4, T5>(DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2, T3, T4, T5>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>> Query<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => Query<T1, T2, T3, T4, T5>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>> Query<T1, T2, T3, T4, T5>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2, T3, T4, T5>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>> Query<T1, T2, T3, T4, T5>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => Query<T1, T2, T3, T4, T5>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>> Query<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        {
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return (new List<T1>(), new List<T2>(), new List<T3>(), new List<T4>(), new List<T5>());
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return NaviteTuple.Create(new List<T1>(), new List<T2>(), new List<T3>(), new List<T4>(), new List<T5>());
 | 
			
		||||
            var ret1 = new List<T1>();
 | 
			
		||||
            var type1 = typeof(T1);
 | 
			
		||||
            string flag1 = null;
 | 
			
		||||
@@ -504,7 +505,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                        break;
 | 
			
		||||
                }
 | 
			
		||||
            }, cmdType, cmdText, cmdParms);
 | 
			
		||||
            return (ret1, ret2, ret3, ret4, ret5);
 | 
			
		||||
            return NaviteTuple.Create(ret1, ret2, ret3, ret4, ret5);
 | 
			
		||||
        }
 | 
			
		||||
        #endregion
 | 
			
		||||
 | 
			
		||||
@@ -771,7 +772,19 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return val;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        (Aop.CommandBeforeEventArgs before, DbCommand cmd, bool isclose) PrepareCommand(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, DbParameter[] cmdParms, StringBuilder logtxt)
 | 
			
		||||
        class PrepareCommandResult
 | 
			
		||||
        {
 | 
			
		||||
            public Aop.CommandBeforeEventArgs before { get; }
 | 
			
		||||
            public DbCommand cmd { get; }
 | 
			
		||||
            public bool isclose { get; }
 | 
			
		||||
            public PrepareCommandResult(Aop.CommandBeforeEventArgs before, DbCommand cmd, bool isclose)
 | 
			
		||||
            {
 | 
			
		||||
                this.before = before;
 | 
			
		||||
                this.cmd = cmd;
 | 
			
		||||
                this.isclose = isclose;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        PrepareCommandResult PrepareCommand(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, DbParameter[] cmdParms, StringBuilder logtxt)
 | 
			
		||||
        {
 | 
			
		||||
            var dt = DateTime.Now;
 | 
			
		||||
            DbCommand cmd = CreateCommand();
 | 
			
		||||
@@ -818,7 +831,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
 | 
			
		||||
            var before = new Aop.CommandBeforeEventArgs(cmd);
 | 
			
		||||
            _util?._orm?.Aop.CommandBeforeHandler?.Invoke(_util._orm, before);
 | 
			
		||||
            return (before, cmd, isclose);
 | 
			
		||||
            return new PrepareCommandResult(before, cmd, isclose);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
using SafeObjectPool;
 | 
			
		||||
using FreeSql.Internal.Model;
 | 
			
		||||
using SafeObjectPool;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Data;
 | 
			
		||||
@@ -48,14 +49,14 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return ret;
 | 
			
		||||
        }
 | 
			
		||||
        #region QueryAsync multi
 | 
			
		||||
        public Task<(List<T1>, List<T2>)> QueryAsync<T1, T2>(string cmdText, object parms = null) => QueryAsync<T1, T2>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<(List<T1>, List<T2>)> QueryAsync<T1, T2>(DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<(List<T1>, List<T2>)> QueryAsync<T1, T2>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<(List<T1>, List<T2>)> QueryAsync<T1, T2>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public Task<(List<T1>, List<T2>)> QueryAsync<T1, T2>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        async public Task<(List<T1>, List<T2>)> QueryAsync<T1, T2>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>>> QueryAsync<T1, T2>(string cmdText, object parms = null) => QueryAsync<T1, T2>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>>> QueryAsync<T1, T2>(DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>>> QueryAsync<T1, T2>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>>> QueryAsync<T1, T2>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>>> QueryAsync<T1, T2>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        async public Task<NaviteTuple<List<T1>, List<T2>>> QueryAsync<T1, T2>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        {
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return (new List<T1>(), new List<T2>());
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return NaviteTuple.Create(new List<T1>(), new List<T2>());
 | 
			
		||||
            var ret1 = new List<T1>();
 | 
			
		||||
            var type1 = typeof(T1);
 | 
			
		||||
            string flag1 = null;
 | 
			
		||||
@@ -108,17 +109,17 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                }
 | 
			
		||||
                return Task.FromResult(false);
 | 
			
		||||
            }, cmdType, cmdText, cmdParms);
 | 
			
		||||
            return (ret1, ret2);
 | 
			
		||||
            return NaviteTuple.Create(ret1, ret2);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>)> QueryAsync<T1, T2, T3>(string cmdText, object parms = null) => QueryAsync<T1, T2, T3>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>)> QueryAsync<T1, T2, T3>(DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2, T3>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>)> QueryAsync<T1, T2, T3>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2, T3>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>)> QueryAsync<T1, T2, T3>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2, T3>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>)> QueryAsync<T1, T2, T3>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2, T3>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        async public Task<(List<T1>, List<T2>, List<T3>)> QueryAsync<T1, T2, T3>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>>> QueryAsync<T1, T2, T3>(string cmdText, object parms = null) => QueryAsync<T1, T2, T3>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>>> QueryAsync<T1, T2, T3>(DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2, T3>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>>> QueryAsync<T1, T2, T3>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2, T3>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>>> QueryAsync<T1, T2, T3>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2, T3>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>>> QueryAsync<T1, T2, T3>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2, T3>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        async public Task<NaviteTuple<List<T1>, List<T2>, List<T3>>> QueryAsync<T1, T2, T3>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        {
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return (new List<T1>(), new List<T2>(), new List<T3>());
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return NaviteTuple.Create(new List<T1>(), new List<T2>(), new List<T3>());
 | 
			
		||||
            var ret1 = new List<T1>();
 | 
			
		||||
            var type1 = typeof(T1);
 | 
			
		||||
            string flag1 = null;
 | 
			
		||||
@@ -194,17 +195,17 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                }
 | 
			
		||||
                return Task.FromResult(false);
 | 
			
		||||
            }, cmdType, cmdText, cmdParms);
 | 
			
		||||
            return (ret1, ret2, ret3);
 | 
			
		||||
            return NaviteTuple.Create(ret1, ret2, ret3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>, List<T4>)> QueryAsync<T1, T2, T3, T4>(string cmdText, object parms = null) => QueryAsync<T1, T2, T3, T4>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>, List<T4>)> QueryAsync<T1, T2, T3, T4>(DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2, T3, T4>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>, List<T4>)> QueryAsync<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2, T3, T4>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>, List<T4>)> QueryAsync<T1, T2, T3, T4>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2, T3, T4>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>, List<T4>)> QueryAsync<T1, T2, T3, T4>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2, T3, T4>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        async public Task<(List<T1>, List<T2>, List<T3>, List<T4>)> QueryAsync<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>>> QueryAsync<T1, T2, T3, T4>(string cmdText, object parms = null) => QueryAsync<T1, T2, T3, T4>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>>> QueryAsync<T1, T2, T3, T4>(DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2, T3, T4>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>>> QueryAsync<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2, T3, T4>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>>> QueryAsync<T1, T2, T3, T4>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2, T3, T4>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>>> QueryAsync<T1, T2, T3, T4>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2, T3, T4>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        async public Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>>> QueryAsync<T1, T2, T3, T4>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        {
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return (new List<T1>(), new List<T2>(), new List<T3>(), new List<T4>());
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return NaviteTuple.Create(new List<T1>(), new List<T2>(), new List<T3>(), new List<T4>());
 | 
			
		||||
            var ret1 = new List<T1>();
 | 
			
		||||
            var type1 = typeof(T1);
 | 
			
		||||
            string flag1 = null;
 | 
			
		||||
@@ -303,17 +304,17 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                }
 | 
			
		||||
                return Task.FromResult(false);
 | 
			
		||||
            }, cmdType, cmdText, cmdParms);
 | 
			
		||||
            return (ret1, ret2, ret3, ret4);
 | 
			
		||||
            return NaviteTuple.Create(ret1, ret2, ret3, ret4);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>, List<T4>, List<T5>)> QueryAsync<T1, T2, T3, T4, T5>(string cmdText, object parms = null) => QueryAsync<T1, T2, T3, T4, T5>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>, List<T4>, List<T5>)> QueryAsync<T1, T2, T3, T4, T5>(DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2, T3, T4, T5>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>, List<T4>, List<T5>)> QueryAsync<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2, T3, T4, T5>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>, List<T4>, List<T5>)> QueryAsync<T1, T2, T3, T4, T5>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2, T3, T4, T5>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public Task<(List<T1>, List<T2>, List<T3>, List<T4>, List<T5>)> QueryAsync<T1, T2, T3, T4, T5>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2, T3, T4, T5>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        async public Task<(List<T1>, List<T2>, List<T3>, List<T4>, List<T5>)> QueryAsync<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>>> QueryAsync<T1, T2, T3, T4, T5>(string cmdText, object parms = null) => QueryAsync<T1, T2, T3, T4, T5>(null, null, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>>> QueryAsync<T1, T2, T3, T4, T5>(DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2, T3, T4, T5>(null, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>>> QueryAsync<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, string cmdText, object parms = null) => QueryAsync<T1, T2, T3, T4, T5>(connection, transaction, CommandType.Text, cmdText, GetDbParamtersByObject(cmdText, parms));
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>>> QueryAsync<T1, T2, T3, T4, T5>(CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2, T3, T4, T5>(null, null, cmdType, cmdText, cmdParms);
 | 
			
		||||
        public Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>>> QueryAsync<T1, T2, T3, T4, T5>(DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms) => QueryAsync<T1, T2, T3, T4, T5>(null, transaction, cmdType, cmdText, cmdParms);
 | 
			
		||||
        async public Task<NaviteTuple<List<T1>, List<T2>, List<T3>, List<T4>, List<T5>>> QueryAsync<T1, T2, T3, T4, T5>(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, params DbParameter[] cmdParms)
 | 
			
		||||
        {
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return (new List<T1>(), new List<T2>(), new List<T3>(), new List<T4>(), new List<T5>());
 | 
			
		||||
            if (string.IsNullOrEmpty(cmdText)) return NaviteTuple.Create(new List<T1>(), new List<T2>(), new List<T3>(), new List<T4>(), new List<T5>());
 | 
			
		||||
            var ret1 = new List<T1>();
 | 
			
		||||
            var type1 = typeof(T1);
 | 
			
		||||
            string flag1 = null;
 | 
			
		||||
@@ -435,7 +436,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                }
 | 
			
		||||
                return Task.FromResult(false);
 | 
			
		||||
            }, cmdType, cmdText, cmdParms);
 | 
			
		||||
            return (ret1, ret2, ret3, ret4, ret5);
 | 
			
		||||
            return NaviteTuple.Create(ret1, ret2, ret3, ret4, ret5);
 | 
			
		||||
        }
 | 
			
		||||
        #endregion
 | 
			
		||||
 | 
			
		||||
@@ -700,7 +701,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return val;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        async Task<(Aop.CommandBeforeEventArgs before, DbCommand cmd, bool isclose)> PrepareCommandAsync(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, DbParameter[] cmdParms, StringBuilder logtxt)
 | 
			
		||||
        async Task<PrepareCommandResult> PrepareCommandAsync(DbConnection connection, DbTransaction transaction, CommandType cmdType, string cmdText, DbParameter[] cmdParms, StringBuilder logtxt)
 | 
			
		||||
        {
 | 
			
		||||
            DateTime dt = DateTime.Now;
 | 
			
		||||
            DbCommand cmd = CreateCommand();
 | 
			
		||||
@@ -744,7 +745,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
 | 
			
		||||
            var before = new Aop.CommandBeforeEventArgs(cmd);
 | 
			
		||||
            _util?._orm?.Aop.CommandBeforeHandler?.Invoke(_util._orm, before);
 | 
			
		||||
            return (before, cmd, isclose);
 | 
			
		||||
            return new PrepareCommandResult(before, cmd, isclose);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
        public virtual bool IsGenerateCommandParameterWithLambda { get; set; } = false;
 | 
			
		||||
        public bool IsLazyLoading { get; set; } = false;
 | 
			
		||||
 | 
			
		||||
        public abstract (int type, string dbtype, string dbtypeFull, bool? isnullable, object defaultValue)? GetDbInfo(Type type);
 | 
			
		||||
        public abstract DbInfoResult GetDbInfo(Type type);
 | 
			
		||||
 | 
			
		||||
        public ICodeFirst ConfigEntity<T>(Action<TableFluent<T>> entity) => _commonUtils.ConfigEntity(entity);
 | 
			
		||||
        public ICodeFirst ConfigEntity(Type type, Action<TableFluent> entity) => _commonUtils.ConfigEntity(type, entity);
 | 
			
		||||
@@ -50,12 +50,22 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return tableName;
 | 
			
		||||
        }
 | 
			
		||||
        public string GetComparisonDDLStatements<TEntity>() =>
 | 
			
		||||
            this.GetComparisonDDLStatements((typeof(TEntity), ""));
 | 
			
		||||
            this.GetComparisonDDLStatements(new TypeAndName(typeof(TEntity), ""));
 | 
			
		||||
        public string GetComparisonDDLStatements(params Type[] entityTypes) => entityTypes == null ? null : 
 | 
			
		||||
            this.GetComparisonDDLStatements(entityTypes.Distinct().Select(a => (a, "")).ToArray());
 | 
			
		||||
            this.GetComparisonDDLStatements(entityTypes.Distinct().Select(a => new TypeAndName(a, "")).ToArray());
 | 
			
		||||
        public string GetComparisonDDLStatements(Type entityType, string tableName) =>
 | 
			
		||||
           this.GetComparisonDDLStatements((entityType, GetTableNameLowerOrUpper(tableName)));
 | 
			
		||||
        protected abstract string GetComparisonDDLStatements(params (Type entityType, string tableName)[] objects);
 | 
			
		||||
           this.GetComparisonDDLStatements(new TypeAndName(entityType, GetTableNameLowerOrUpper(tableName)));
 | 
			
		||||
        protected abstract string GetComparisonDDLStatements(params TypeAndName[] objects);
 | 
			
		||||
        public class TypeAndName
 | 
			
		||||
        {
 | 
			
		||||
            public Type entityType { get; }
 | 
			
		||||
            public string tableName { get; }
 | 
			
		||||
            public TypeAndName(Type entityType, string tableName)
 | 
			
		||||
            {
 | 
			
		||||
                this.entityType = entityType;
 | 
			
		||||
                this.tableName = tableName;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        static object syncStructureLock = new object();
 | 
			
		||||
        object _dicSycedLock = new object();
 | 
			
		||||
@@ -72,16 +82,16 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            _dicSycedGetOrAdd(entityType).TryAdd(GetTableNameLowerOrUpper(tableName), true);
 | 
			
		||||
 | 
			
		||||
        public bool SyncStructure<TEntity>() =>
 | 
			
		||||
            this.SyncStructure((typeof(TEntity), ""));
 | 
			
		||||
            this.SyncStructure(new TypeAndName(typeof(TEntity), ""));
 | 
			
		||||
        public bool SyncStructure(params Type[] entityTypes) => entityTypes == null ? false :
 | 
			
		||||
            this.SyncStructure(entityTypes.Distinct().Select(a => (a, "")).ToArray());
 | 
			
		||||
            this.SyncStructure(entityTypes.Distinct().Select(a => new TypeAndName(a, "")).ToArray());
 | 
			
		||||
        public bool SyncStructure(Type entityType, string tableName) =>
 | 
			
		||||
           this.SyncStructure((entityType, GetTableNameLowerOrUpper(tableName)));
 | 
			
		||||
        protected bool SyncStructure(params (Type entityType, string tableName)[] objects)
 | 
			
		||||
           this.SyncStructure(new TypeAndName(entityType, GetTableNameLowerOrUpper(tableName)));
 | 
			
		||||
        protected bool SyncStructure(params TypeAndName[] objects)
 | 
			
		||||
        {
 | 
			
		||||
            if (objects == null) return false;
 | 
			
		||||
            (Type entityType, string tableName)[] syncObjects = objects.Where(a => _dicSycedGetOrAdd(a.entityType).ContainsKey(GetTableNameLowerOrUpper(a.tableName)) == false && GetTableByEntity(a.entityType)?.DisableSyncStructure == false)
 | 
			
		||||
                .Select(a => (a.entityType, GetTableNameLowerOrUpper(a.tableName))).ToArray();
 | 
			
		||||
            var syncObjects = objects.Where(a => _dicSycedGetOrAdd(a.entityType).ContainsKey(GetTableNameLowerOrUpper(a.tableName)) == false && GetTableByEntity(a.entityType)?.DisableSyncStructure == false)
 | 
			
		||||
                .Select(a => new TypeAndName(a.entityType, GetTableNameLowerOrUpper(a.tableName))).ToArray();
 | 
			
		||||
            if (syncObjects.Any() == false) return false;
 | 
			
		||||
            var before = new Aop.SyncStructureBeforeEventArgs(syncObjects.Select(a => a.entityType).ToArray());
 | 
			
		||||
            _orm.Aop.SyncStructureBeforeHandler?.Invoke(this, before);
 | 
			
		||||
 
 | 
			
		||||
@@ -349,7 +349,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            }
 | 
			
		||||
            return ret;
 | 
			
		||||
        }
 | 
			
		||||
        internal List<T1> ToListAfPrivate(string sql, GetAllFieldExpressionTreeInfo af, (string field, ReadAnonymousTypeInfo read, List<object> retlist)[] otherData)
 | 
			
		||||
        internal List<T1> ToListAfPrivate(string sql, GetAllFieldExpressionTreeInfo af, ReadAnonymousTypeOtherInfo[] otherData)
 | 
			
		||||
        {
 | 
			
		||||
            var dbParms = _params.ToArray();
 | 
			
		||||
            var before = new Aop.CurdBeforeEventArgs(_tables[0].Table.Type, _tables[0].Table, Aop.CurdType.Select, sql, dbParms);
 | 
			
		||||
@@ -383,7 +383,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            _trackToList?.Invoke(ret);
 | 
			
		||||
            return ret;
 | 
			
		||||
        }
 | 
			
		||||
        internal List<T1> ToListPrivate(GetAllFieldExpressionTreeInfo af, (string field, ReadAnonymousTypeInfo read, List<object> retlist)[] otherData)
 | 
			
		||||
        internal List<T1> ToListPrivate(GetAllFieldExpressionTreeInfo af, ReadAnonymousTypeOtherInfo[] otherData)
 | 
			
		||||
        {
 | 
			
		||||
            string sql = null;
 | 
			
		||||
            if (otherData?.Length > 0)
 | 
			
		||||
@@ -399,7 +399,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return ToListAfPrivate(sql, af, otherData);
 | 
			
		||||
        }
 | 
			
		||||
        #region ToChunk
 | 
			
		||||
        internal void ToListAfChunkPrivate(int chunkSize, Action<List<T1>> chunkDone, string sql, GetAllFieldExpressionTreeInfo af, (string field, ReadAnonymousTypeInfo read, List<object> retlist)[] otherData)
 | 
			
		||||
        internal void ToListAfChunkPrivate(int chunkSize, Action<List<T1>> chunkDone, string sql, GetAllFieldExpressionTreeInfo af, ReadAnonymousTypeOtherInfo[] otherData)
 | 
			
		||||
        {
 | 
			
		||||
            var dbParms = _params.ToArray();
 | 
			
		||||
            var before = new Aop.CurdBeforeEventArgs(_tables[0].Table.Type, _tables[0].Table, Aop.CurdType.Select, sql, dbParms);
 | 
			
		||||
@@ -453,7 +453,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                chunkDone(ret);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        internal void ToListChunkPrivate(int chunkSize, Action<List<T1>> chunkDone, GetAllFieldExpressionTreeInfo af, (string field, ReadAnonymousTypeInfo read, List<object> retlist)[] otherData)
 | 
			
		||||
        internal void ToListChunkPrivate(int chunkSize, Action<List<T1>> chunkDone, GetAllFieldExpressionTreeInfo af, ReadAnonymousTypeOtherInfo[] otherData)
 | 
			
		||||
        {
 | 
			
		||||
            string sql = null;
 | 
			
		||||
            if (otherData?.Length > 0)
 | 
			
		||||
@@ -487,7 +487,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
 | 
			
		||||
        public T1 First() => this.ToOne();
 | 
			
		||||
 | 
			
		||||
        internal List<TReturn> ToListMrPrivate<TReturn>(string sql, (ReadAnonymousTypeInfo map, string field) af, (string field, ReadAnonymousTypeInfo read, List<object> retlist)[] otherData)
 | 
			
		||||
        internal List<TReturn> ToListMrPrivate<TReturn>(string sql, ReadAnonymousTypeAfInfo af, ReadAnonymousTypeOtherInfo[] otherData)
 | 
			
		||||
        {
 | 
			
		||||
            var type = typeof(TReturn);
 | 
			
		||||
            var dbParms = _params.ToArray();
 | 
			
		||||
@@ -521,7 +521,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            _trackToList?.Invoke(ret);
 | 
			
		||||
            return ret;
 | 
			
		||||
        }
 | 
			
		||||
        internal List<TReturn> ToListMapReaderPrivate<TReturn>((ReadAnonymousTypeInfo map, string field) af, (string field, ReadAnonymousTypeInfo read, List<object> retlist)[] otherData)
 | 
			
		||||
        internal List<TReturn> ToListMapReaderPrivate<TReturn>(ReadAnonymousTypeAfInfo af, ReadAnonymousTypeOtherInfo[] otherData)
 | 
			
		||||
        {
 | 
			
		||||
            string sql = null;
 | 
			
		||||
            if (otherData?.Length > 0)
 | 
			
		||||
@@ -536,15 +536,15 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
 | 
			
		||||
            return ToListMrPrivate<TReturn>(sql, af, otherData);
 | 
			
		||||
        }
 | 
			
		||||
        protected List<TReturn> ToListMapReader<TReturn>((ReadAnonymousTypeInfo map, string field) af) => ToListMapReaderPrivate<TReturn>(af, null);
 | 
			
		||||
        protected (ReadAnonymousTypeInfo map, string field) GetExpressionField(Expression newexp, FieldAliasOptions fieldAlias = FieldAliasOptions.AsIndex)
 | 
			
		||||
        protected List<TReturn> ToListMapReader<TReturn>(ReadAnonymousTypeAfInfo af) => ToListMapReaderPrivate<TReturn>(af, null);
 | 
			
		||||
        protected ReadAnonymousTypeAfInfo GetExpressionField(Expression newexp, FieldAliasOptions fieldAlias = FieldAliasOptions.AsIndex)
 | 
			
		||||
        {
 | 
			
		||||
            var map = new ReadAnonymousTypeInfo();
 | 
			
		||||
            var field = new StringBuilder();
 | 
			
		||||
            var index = fieldAlias == FieldAliasOptions.AsProperty ? CommonExpression.ReadAnonymousFieldAsCsName : 0;
 | 
			
		||||
 | 
			
		||||
            _commonExpression.ReadAnonymousField(_tables, field, map, ref index, newexp, null, _whereCascadeExpression, true);
 | 
			
		||||
            return (map, field.Length > 0 ? field.Remove(0, 2).ToString() : null);
 | 
			
		||||
            return new ReadAnonymousTypeAfInfo(map, field.Length > 0 ? field.Remove(0, 2).ToString() : null);
 | 
			
		||||
        }
 | 
			
		||||
        static ConcurrentDictionary<string, GetAllFieldExpressionTreeInfo> _dicGetAllFieldExpressionTree = new ConcurrentDictionary<string, GetAllFieldExpressionTreeInfo>();
 | 
			
		||||
        public class GetAllFieldExpressionTreeInfo
 | 
			
		||||
@@ -830,7 +830,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                };
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
        protected (ReadAnonymousTypeInfo map, string field) GetAllFieldReflection()
 | 
			
		||||
        protected ReadAnonymousTypeAfInfo GetAllFieldReflection()
 | 
			
		||||
        {
 | 
			
		||||
            var tb1 = _tables.First().Table;
 | 
			
		||||
            var type = tb1.TypeLazy ?? tb1.Type;
 | 
			
		||||
@@ -879,7 +879,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                }
 | 
			
		||||
                map.Childs.Add(child);
 | 
			
		||||
            }
 | 
			
		||||
            return (map, field.ToString());
 | 
			
		||||
            return new ReadAnonymousTypeAfInfo(map, field.ToString());
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        string GetToDeleteWhere(string alias)
 | 
			
		||||
@@ -1109,7 +1109,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            var index = 0;
 | 
			
		||||
 | 
			
		||||
            _commonExpression.ReadAnonymousField(_tables, field, map, ref index, select, null, _whereCascadeExpression, true);
 | 
			
		||||
            return this.ToListMapReader<TReturn>((map, field.Length > 0 ? field.Remove(0, 2).ToString() : null)).FirstOrDefault();
 | 
			
		||||
            return this.ToListMapReader<TReturn>(new ReadAnonymousTypeAfInfo(map, field.Length > 0 ? field.Remove(0, 2).ToString() : null)).FirstOrDefault();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected TSelect InternalWhere(Expression exp) => exp == null ? this as TSelect : this.Where(_commonExpression.ExpressionWhereLambda(_tables, exp, null, _whereCascadeExpression, _params));
 | 
			
		||||
@@ -1194,7 +1194,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return ret;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        async internal Task<List<T1>> ToListAfPrivateAsync(string sql, GetAllFieldExpressionTreeInfo af, (string field, ReadAnonymousTypeInfo read, List<object> retlist)[] otherData)
 | 
			
		||||
        async internal Task<List<T1>> ToListAfPrivateAsync(string sql, GetAllFieldExpressionTreeInfo af, ReadAnonymousTypeOtherInfo[] otherData)
 | 
			
		||||
        {
 | 
			
		||||
            var dbParms = _params.ToArray();
 | 
			
		||||
            var before = new Aop.CurdBeforeEventArgs(_tables[0].Table.Type, _tables[0].Table, Aop.CurdType.Select, sql, dbParms);
 | 
			
		||||
@@ -1230,7 +1230,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return ret;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        internal Task<List<T1>> ToListPrivateAsync(GetAllFieldExpressionTreeInfo af, (string field, ReadAnonymousTypeInfo read, List<object> retlist)[] otherData)
 | 
			
		||||
        internal Task<List<T1>> ToListPrivateAsync(GetAllFieldExpressionTreeInfo af, ReadAnonymousTypeOtherInfo[] otherData)
 | 
			
		||||
        {
 | 
			
		||||
            string sql = null;
 | 
			
		||||
            if (otherData?.Length > 0)
 | 
			
		||||
@@ -1260,7 +1260,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
 | 
			
		||||
        public Task<T1> FirstAsync() => this.ToOneAsync();
 | 
			
		||||
 | 
			
		||||
        async internal Task<List<TReturn>> ToListMrPrivateAsync<TReturn>(string sql, (ReadAnonymousTypeInfo map, string field) af, (string field, ReadAnonymousTypeInfo read, List<object> retlist)[] otherData)
 | 
			
		||||
        async internal Task<List<TReturn>> ToListMrPrivateAsync<TReturn>(string sql, ReadAnonymousTypeAfInfo af, ReadAnonymousTypeOtherInfo[] otherData)
 | 
			
		||||
        {
 | 
			
		||||
            var type = typeof(TReturn);
 | 
			
		||||
            var dbParms = _params.ToArray();
 | 
			
		||||
@@ -1295,7 +1295,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            _trackToList?.Invoke(ret);
 | 
			
		||||
            return ret;
 | 
			
		||||
        }
 | 
			
		||||
        internal Task<List<TReturn>> ToListMapReaderPrivateAsync<TReturn>((ReadAnonymousTypeInfo map, string field) af, (string field, ReadAnonymousTypeInfo read, List<object> retlist)[] otherData)
 | 
			
		||||
        internal Task<List<TReturn>> ToListMapReaderPrivateAsync<TReturn>(ReadAnonymousTypeAfInfo af, ReadAnonymousTypeOtherInfo[] otherData)
 | 
			
		||||
        {
 | 
			
		||||
            string sql = null;
 | 
			
		||||
            if (otherData?.Length > 0)
 | 
			
		||||
@@ -1310,7 +1310,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
 | 
			
		||||
            return ToListMrPrivateAsync<TReturn>(sql, af, otherData);
 | 
			
		||||
        }
 | 
			
		||||
        protected Task<List<TReturn>> ToListMapReaderAsync<TReturn>((ReadAnonymousTypeInfo map, string field) af) => ToListMapReaderPrivateAsync<TReturn>(af, null);
 | 
			
		||||
        protected Task<List<TReturn>> ToListMapReaderAsync<TReturn>(ReadAnonymousTypeAfInfo af) => ToListMapReaderPrivateAsync<TReturn>(af, null);
 | 
			
		||||
 | 
			
		||||
        async protected Task<double> InternalAvgAsync(Expression exp)
 | 
			
		||||
        {
 | 
			
		||||
@@ -1355,7 +1355,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            var index = 0;
 | 
			
		||||
 | 
			
		||||
            _commonExpression.ReadAnonymousField(_tables, field, map, ref index, select, null, _whereCascadeExpression, true);
 | 
			
		||||
            return (await this.ToListMapReaderAsync<TReturn>((map, field.Length > 0 ? field.Remove(0, 2).ToString() : null))).FirstOrDefault();
 | 
			
		||||
            return (await this.ToListMapReaderAsync<TReturn>(new ReadAnonymousTypeAfInfo(map, field.Length > 0 ? field.Remove(0, 2).ToString() : null))).FirstOrDefault();
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -43,11 +43,11 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return this.InternalAvg(column?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TKey>> exp)
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TKey>> exp)
 | 
			
		||||
        {
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>(exp?.Body);
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>>(exp?.Body);
 | 
			
		||||
            for (var a = 0; a < exp.Parameters.Count; a++) _tables[a].Parameter = exp.Parameters[a];
 | 
			
		||||
            return this.InternalGroupBy<TKey, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>(exp?.Body);
 | 
			
		||||
            return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>>(exp?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        TMember ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.Max<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TMember>> column)
 | 
			
		||||
 
 | 
			
		||||
@@ -368,7 +368,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return this;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        static (ParameterExpression param, List<MemberExpression> members) GetExpressionStack(Expression exp)
 | 
			
		||||
        static NaviteTuple<ParameterExpression, List<MemberExpression>> GetExpressionStack(Expression exp)
 | 
			
		||||
        {
 | 
			
		||||
            Expression tmpExp = exp;
 | 
			
		||||
            ParameterExpression param = null;
 | 
			
		||||
@@ -392,7 +392,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            if (param == null) throw new Exception($"表达式错误,它的顶级对象不是 ParameterExpression:{exp}");
 | 
			
		||||
            return (param, members);
 | 
			
		||||
            return NaviteTuple.Create(param, members);
 | 
			
		||||
        }
 | 
			
		||||
        static MethodInfo GetEntityValueWithPropertyNameMethod = typeof(EntityUtilExtensions).GetMethod("GetEntityValueWithPropertyName");
 | 
			
		||||
        static ConcurrentDictionary<Type, ConcurrentDictionary<string, MethodInfo>> _dicTypeMethod = new ConcurrentDictionary<Type, ConcurrentDictionary<string, MethodInfo>>();
 | 
			
		||||
@@ -429,7 +429,9 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
 | 
			
		||||
            if (expBody.NodeType != ExpressionType.MemberAccess) throw throwNavigateSelector;
 | 
			
		||||
            var collMem = expBody as MemberExpression;
 | 
			
		||||
            var (membersParam, members) = GetExpressionStack(collMem.Expression);
 | 
			
		||||
            var ges = GetExpressionStack(collMem.Expression);
 | 
			
		||||
            var membersParam = ges.Item1;
 | 
			
		||||
            var members = ges.Item2;
 | 
			
		||||
            var tb = _commonUtils.GetTableByEntity(collMem.Expression.Type);
 | 
			
		||||
            if (tb == null) throw throwNavigateSelector;
 | 
			
		||||
            var collMemElementType = (collMem.Type.IsGenericType ? collMem.Type.GetGenericArguments().FirstOrDefault() : collMem.Type.GetElementType());
 | 
			
		||||
@@ -484,7 +486,9 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
 | 
			
		||||
                                if (leftP1MemberExp.Expression == whereExpArgLamb.Parameters[0])
 | 
			
		||||
                                {
 | 
			
		||||
                                    var (rightMembersParam, rightMembers) = GetExpressionStack(rightP1MemberExp.Expression);
 | 
			
		||||
                                    var rightGes = GetExpressionStack(rightP1MemberExp.Expression);
 | 
			
		||||
                                    var rightMembersParam = rightGes.Item1;
 | 
			
		||||
                                    var rightMembers = rightGes.Item2;
 | 
			
		||||
                                    if (rightMembersParam != membersParam) throw throwNavigateSelector;
 | 
			
		||||
                                    var isCollMemEquals = rightMembers.Count == members.Count;
 | 
			
		||||
                                    if (isCollMemEquals)
 | 
			
		||||
@@ -513,7 +517,9 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                                }
 | 
			
		||||
                                if (rightP1MemberExp.Expression == whereExpArgLamb.Parameters[0])
 | 
			
		||||
                                {
 | 
			
		||||
                                    var (leftMembersParam, leftMembers) = GetExpressionStack(leftP1MemberExp.Expression);
 | 
			
		||||
                                    var leftGes = GetExpressionStack(leftP1MemberExp.Expression);
 | 
			
		||||
                                    var leftMembersParam = leftGes.Item1;
 | 
			
		||||
                                    var leftMembers = leftGes.Item2;
 | 
			
		||||
                                    if (leftMembersParam != membersParam) throw throwNavigateSelector;
 | 
			
		||||
                                    var isCollMemEquals = leftMembers.Count == members.Count;
 | 
			
		||||
                                    if (isCollMemEquals)
 | 
			
		||||
@@ -715,7 +721,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                            if (takeNumber > 0)
 | 
			
		||||
                            {
 | 
			
		||||
                                Select0Provider<ISelect<TNavigate>, TNavigate>.GetAllFieldExpressionTreeInfo af = null;
 | 
			
		||||
                                (ReadAnonymousTypeInfo map, string field) mf = default;
 | 
			
		||||
                                ReadAnonymousTypeAfInfo mf = default;
 | 
			
		||||
                                if (selectExp == null) af = subSelect.GetAllFieldExpressionTreeLevelAll();
 | 
			
		||||
                                else mf = subSelect.GetExpressionField(selectExp);
 | 
			
		||||
                                var sbSql = new StringBuilder();
 | 
			
		||||
@@ -890,10 +896,10 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                            sbJoin.Clear();
 | 
			
		||||
 | 
			
		||||
                            Select0Provider<ISelect<TNavigate>, TNavigate>.GetAllFieldExpressionTreeInfo af = null;
 | 
			
		||||
                            (ReadAnonymousTypeInfo map, string field) mf = default;
 | 
			
		||||
                            ReadAnonymousTypeAfInfo mf = default;
 | 
			
		||||
                            if (selectExp == null) af = subSelect.GetAllFieldExpressionTreeLevelAll();
 | 
			
		||||
                            else mf = subSelect.GetExpressionField(selectExp);
 | 
			
		||||
                            (string field, ReadAnonymousTypeInfo read)? otherData = null;
 | 
			
		||||
                            ReadAnonymousTypeAfInfo otherData = null;
 | 
			
		||||
                            var sbSql = new StringBuilder();
 | 
			
		||||
 | 
			
		||||
                            if (_selectExpression == null)
 | 
			
		||||
@@ -918,7 +924,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                                    read.Childs.Add(child);
 | 
			
		||||
                                    field.Append(", ").Append(_commonUtils.QuoteReadColumn(child.CsType, child.MapType, child.DbField));
 | 
			
		||||
                                }
 | 
			
		||||
                                otherData = (field.ToString(), read);
 | 
			
		||||
                                otherData = new ReadAnonymousTypeAfInfo(read, field.ToString());
 | 
			
		||||
                            }
 | 
			
		||||
                            Func<Dictionary<string, bool>> getWhereDic = () =>
 | 
			
		||||
                            {
 | 
			
		||||
@@ -978,14 +984,14 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                            {
 | 
			
		||||
#if net40
 | 
			
		||||
#else
 | 
			
		||||
                                if (selectExp == null) subList = await subSelect.ToListAfPrivateAsync(sbSql.ToString(), af, otherData == null ? null : new[] { (otherData.Value.field, otherData.Value.read, midList) });
 | 
			
		||||
                                else subList = await subSelect.ToListMrPrivateAsync<TNavigate>(sbSql.ToString(), mf, otherData == null ? null : new[] { (otherData.Value.field, otherData.Value.read, midList) });
 | 
			
		||||
                                if (selectExp == null) subList = await subSelect.ToListAfPrivateAsync(sbSql.ToString(), af, otherData == null ? null : new[] { new ReadAnonymousTypeOtherInfo(otherData.field, otherData.map, midList) });
 | 
			
		||||
                                else subList = await subSelect.ToListMrPrivateAsync<TNavigate>(sbSql.ToString(), mf, otherData == null ? null : new[] { new ReadAnonymousTypeOtherInfo(otherData.field, otherData.map, midList) });
 | 
			
		||||
#endif
 | 
			
		||||
                            }
 | 
			
		||||
                            else
 | 
			
		||||
                            {
 | 
			
		||||
                                if (selectExp == null) subList = subSelect.ToListAfPrivate(sbSql.ToString(), af, otherData == null ? null : new[] { (otherData.Value.field, otherData.Value.read, midList) });
 | 
			
		||||
                                else subList = subSelect.ToListMrPrivate<TNavigate>(sbSql.ToString(), mf, otherData == null ? null : new[] { (otherData.Value.field, otherData.Value.read, midList) });
 | 
			
		||||
                                if (selectExp == null) subList = subSelect.ToListAfPrivate(sbSql.ToString(), af, otherData == null ? null : new[] { new ReadAnonymousTypeOtherInfo(otherData.field, otherData.map, midList) });
 | 
			
		||||
                                else subList = subSelect.ToListMrPrivate<TNavigate>(sbSql.ToString(), mf, otherData == null ? null : new[] { new ReadAnonymousTypeOtherInfo(otherData.field, otherData.map, midList) });
 | 
			
		||||
                            }
 | 
			
		||||
                            if (subList.Any() == false)
 | 
			
		||||
                            {
 | 
			
		||||
 
 | 
			
		||||
@@ -27,11 +27,11 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return this.InternalAvg(column?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2)> ISelect<T1, T2>.GroupBy<TKey>(Expression<Func<T1, T2, TKey>> exp)
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2>> ISelect<T1, T2>.GroupBy<TKey>(Expression<Func<T1, T2, TKey>> exp)
 | 
			
		||||
        {
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, (T1, T2)>(exp?.Body);
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, NaviteTuple<T1, T2>>(exp?.Body);
 | 
			
		||||
            for (var a = 0; a < exp.Parameters.Count; a++) _tables[a].Parameter = exp.Parameters[a];
 | 
			
		||||
            return this.InternalGroupBy<TKey, (T1, T2)>(exp?.Body);
 | 
			
		||||
            return this.InternalGroupBy<TKey, NaviteTuple<T1, T2>>(exp?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        TMember ISelect<T1, T2>.Max<TMember>(Expression<Func<T1, T2, TMember>> column)
 | 
			
		||||
 
 | 
			
		||||
@@ -29,11 +29,11 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return this.InternalAvg(column?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3)> ISelect<T1, T2, T3>.GroupBy<TKey>(Expression<Func<T1, T2, T3, TKey>> exp)
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3>> ISelect<T1, T2, T3>.GroupBy<TKey>(Expression<Func<T1, T2, T3, TKey>> exp)
 | 
			
		||||
        {
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, (T1, T2, T3)>(exp?.Body);
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3>>(exp?.Body);
 | 
			
		||||
            for (var a = 0; a < exp.Parameters.Count; a++) _tables[a].Parameter = exp.Parameters[a];
 | 
			
		||||
            return this.InternalGroupBy<TKey, (T1, T2, T3)>(exp?.Body);
 | 
			
		||||
            return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3>>(exp?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        TMember ISelect<T1, T2, T3>.Max<TMember>(Expression<Func<T1, T2, T3, TMember>> column)
 | 
			
		||||
 
 | 
			
		||||
@@ -31,11 +31,11 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return this.InternalAvg(column?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4)> ISelect<T1, T2, T3, T4>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, TKey>> exp)
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4>> ISelect<T1, T2, T3, T4>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, TKey>> exp)
 | 
			
		||||
        {
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, (T1, T2, T3, T4)>(exp?.Body);
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4>>(exp?.Body);
 | 
			
		||||
            for (var a = 0; a < exp.Parameters.Count; a++) _tables[a].Parameter = exp.Parameters[a];
 | 
			
		||||
            return this.InternalGroupBy<TKey, (T1, T2, T3, T4)>(exp?.Body);
 | 
			
		||||
            return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4>>(exp?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        TMember ISelect<T1, T2, T3, T4>.Max<TMember>(Expression<Func<T1, T2, T3, T4, TMember>> column)
 | 
			
		||||
 
 | 
			
		||||
@@ -33,11 +33,11 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return this.InternalAvg(column?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4, T5)> ISelect<T1, T2, T3, T4, T5>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, TKey>> exp)
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4, T5>> ISelect<T1, T2, T3, T4, T5>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, TKey>> exp)
 | 
			
		||||
        {
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, (T1, T2, T3, T4, T5)>(exp?.Body);
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4, T5>>(exp?.Body);
 | 
			
		||||
            for (var a = 0; a < exp.Parameters.Count; a++) _tables[a].Parameter = exp.Parameters[a];
 | 
			
		||||
            return this.InternalGroupBy<TKey, (T1, T2, T3, T4, T5)>(exp?.Body);
 | 
			
		||||
            return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4, T5>>(exp?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        TMember ISelect<T1, T2, T3, T4, T5>.Max<TMember>(Expression<Func<T1, T2, T3, T4, T5, TMember>> column)
 | 
			
		||||
 
 | 
			
		||||
@@ -35,11 +35,11 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return this.InternalAvg(column?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4, T5, T6)> ISelect<T1, T2, T3, T4, T5, T6>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, TKey>> exp)
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6>> ISelect<T1, T2, T3, T4, T5, T6>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, TKey>> exp)
 | 
			
		||||
        {
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, (T1, T2, T3, T4, T5, T6)>(exp?.Body);
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6>>(exp?.Body);
 | 
			
		||||
            for (var a = 0; a < exp.Parameters.Count; a++) _tables[a].Parameter = exp.Parameters[a];
 | 
			
		||||
            return this.InternalGroupBy<TKey, (T1, T2, T3, T4, T5, T6)>(exp?.Body);
 | 
			
		||||
            return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6>>(exp?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        TMember ISelect<T1, T2, T3, T4, T5, T6>.Max<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, TMember>> column)
 | 
			
		||||
 
 | 
			
		||||
@@ -37,11 +37,11 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return this.InternalAvg(column?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4, T5, T6, T7)> ISelect<T1, T2, T3, T4, T5, T6, T7>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TKey>> exp)
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7>> ISelect<T1, T2, T3, T4, T5, T6, T7>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TKey>> exp)
 | 
			
		||||
        {
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, (T1, T2, T3, T4, T5, T6, T7)>(exp?.Body);
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7>>(exp?.Body);
 | 
			
		||||
            for (var a = 0; a < exp.Parameters.Count; a++) _tables[a].Parameter = exp.Parameters[a];
 | 
			
		||||
            return this.InternalGroupBy<TKey, (T1, T2, T3, T4, T5, T6, T7)>(exp?.Body);
 | 
			
		||||
            return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7>>(exp?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        TMember ISelect<T1, T2, T3, T4, T5, T6, T7>.Max<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TMember>> column)
 | 
			
		||||
 
 | 
			
		||||
@@ -39,11 +39,11 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return this.InternalAvg(column?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4, T5, T6, T7, T8)> ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TKey>> exp)
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8>> ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TKey>> exp)
 | 
			
		||||
        {
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, (T1, T2, T3, T4, T5, T6, T7, T8)>(exp?.Body);
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8>>(exp?.Body);
 | 
			
		||||
            for (var a = 0; a < exp.Parameters.Count; a++) _tables[a].Parameter = exp.Parameters[a];
 | 
			
		||||
            return this.InternalGroupBy<TKey, (T1, T2, T3, T4, T5, T6, T7, T8)>(exp?.Body);
 | 
			
		||||
            return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8>>(exp?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        TMember ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.Max<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TMember>> column)
 | 
			
		||||
 
 | 
			
		||||
@@ -41,11 +41,11 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return this.InternalAvg(column?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ISelectGrouping<TKey, (T1, T2, T3, T4, T5, T6, T7, T8, T9)> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TKey>> exp)
 | 
			
		||||
        ISelectGrouping<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.GroupBy<TKey>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TKey>> exp)
 | 
			
		||||
        {
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, (T1, T2, T3, T4, T5, T6, T7, T8, T9)>(exp?.Body);
 | 
			
		||||
            if (exp == null) return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>>(exp?.Body);
 | 
			
		||||
            for (var a = 0; a < exp.Parameters.Count; a++) _tables[a].Parameter = exp.Parameters[a];
 | 
			
		||||
            return this.InternalGroupBy<TKey, (T1, T2, T3, T4, T5, T6, T7, T8, T9)>(exp?.Body);
 | 
			
		||||
            return this.InternalGroupBy<TKey, NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>>(exp?.Body);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        TMember ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.Max<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TMember>> column)
 | 
			
		||||
 
 | 
			
		||||
@@ -117,7 +117,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            if (map.Childs.Any() == false && map.MapType == null) map.MapType = typeof(TReturn);
 | 
			
		||||
            var method = _select.GetType().GetMethod("ToListMapReader", BindingFlags.Instance | BindingFlags.NonPublic);
 | 
			
		||||
            method = method.MakeGenericMethod(typeof(TReturn));
 | 
			
		||||
            return method.Invoke(_select, new object[] { (map, field.Length > 0 ? field.Remove(0, 2).ToString() : null) }) as List<TReturn>;
 | 
			
		||||
            return method.Invoke(_select, new object[] { new ReadAnonymousTypeAfInfo(map, field.Length > 0 ? field.Remove(0, 2).ToString() : null) }) as List<TReturn>;
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        public List<TReturn> Select<TReturn>(Expression<Func<ISelectGroupingAggregate<TKey, TValue>, TReturn>> select) => ToList(select);
 | 
			
		||||
@@ -185,7 +185,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            if (map.Childs.Any() == false && map.MapType == null) map.MapType = typeof(TReturn);
 | 
			
		||||
            var method = _select.GetType().GetMethod("ToListMapReaderAsync", BindingFlags.Instance | BindingFlags.NonPublic);
 | 
			
		||||
            method = method.MakeGenericMethod(typeof(TReturn));
 | 
			
		||||
            return method.Invoke(_select, new object[] { (map, field.Length > 0 ? field.Remove(0, 2).ToString() : null) }) as Task<List<TReturn>>;
 | 
			
		||||
            return method.Invoke(_select, new object[] { new ReadAnonymousTypeAfInfo(map, field.Length > 0 ? field.Remove(0, 2).ToString() : null) }) as Task<List<TReturn>>;
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										71
									
								
								FreeSql/Internal/Model/DbToCs.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								FreeSql/Internal/Model/DbToCs.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,71 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Text;
 | 
			
		||||
 | 
			
		||||
namespace FreeSql.Internal.Model
 | 
			
		||||
{
 | 
			
		||||
    public class DbToCs
 | 
			
		||||
    {
 | 
			
		||||
        public string csConvert { get; }
 | 
			
		||||
        public string csParse { get; }
 | 
			
		||||
        public string csStringify { get; }
 | 
			
		||||
        public string csType { get; }
 | 
			
		||||
        public Type csTypeInfo { get; }
 | 
			
		||||
        public Type csNullableTypeInfo { get; }
 | 
			
		||||
        public string csTypeValue { get; }
 | 
			
		||||
        public string dataReaderMethod { get; }
 | 
			
		||||
        public DbToCs(string csConvert, string csParse, string csStringify, string csType, Type csTypeInfo, Type csNullableTypeInfo, string csTypeValue, string dataReaderMethod)
 | 
			
		||||
        {
 | 
			
		||||
            this.csConvert = csConvert;
 | 
			
		||||
            this.csParse = csParse;
 | 
			
		||||
            this.csStringify = csStringify;
 | 
			
		||||
            this.csType = csType;
 | 
			
		||||
            this.csTypeInfo = csTypeInfo;
 | 
			
		||||
            this.csNullableTypeInfo = csNullableTypeInfo;
 | 
			
		||||
            this.csTypeValue = csTypeValue;
 | 
			
		||||
            this.dataReaderMethod = dataReaderMethod;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class CsToDb
 | 
			
		||||
    {
 | 
			
		||||
        public static CsToDb<T> New<T>(T type, string dbtype, string dbtypeFull, bool? isUnsigned, bool? isnullable, object defaultValue) =>
 | 
			
		||||
            new CsToDb<T>(type, dbtype, dbtypeFull, isUnsigned, isnullable, defaultValue);
 | 
			
		||||
    }
 | 
			
		||||
    public class CsToDb<T>
 | 
			
		||||
    {
 | 
			
		||||
        public T type { get; }
 | 
			
		||||
        public string dbtype { get; }
 | 
			
		||||
        public string dbtypeFull { get; }
 | 
			
		||||
        public bool? isUnsigned { get; }
 | 
			
		||||
        public bool? isnullable { get; }
 | 
			
		||||
        public object defaultValue { get; }
 | 
			
		||||
        public CsToDb(T type, string dbtype, string dbtypeFull, bool? isUnsigned, bool? isnullable, object defaultValue)
 | 
			
		||||
        {
 | 
			
		||||
            this.type = type;
 | 
			
		||||
            this.dbtype = dbtype;
 | 
			
		||||
            this.dbtypeFull = dbtypeFull;
 | 
			
		||||
            this.isUnsigned = isUnsigned;
 | 
			
		||||
            this.isnullable = isnullable;
 | 
			
		||||
            this.defaultValue = defaultValue;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public class DbInfoResult
 | 
			
		||||
    {
 | 
			
		||||
        public int type { get; }
 | 
			
		||||
        public string dbtype { get; }
 | 
			
		||||
        public string dbtypeFull { get; }
 | 
			
		||||
        public bool? isnullable { get; }
 | 
			
		||||
        public object defaultValue { get; }
 | 
			
		||||
        public DbInfoResult(int type, string dbtype, string dbtypeFull, bool? isnullable, object defaultValue)
 | 
			
		||||
        {
 | 
			
		||||
            this.type = type;
 | 
			
		||||
            this.dbtype = dbtype;
 | 
			
		||||
            this.dbtypeFull = dbtypeFull;
 | 
			
		||||
            this.isnullable = isnullable;
 | 
			
		||||
            this.defaultValue = defaultValue;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										182
									
								
								FreeSql/Internal/Model/NaviteTuple.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										182
									
								
								FreeSql/Internal/Model/NaviteTuple.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,182 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Text;
 | 
			
		||||
 | 
			
		||||
namespace FreeSql.Internal.Model
 | 
			
		||||
{
 | 
			
		||||
    public static class NaviteTuple
 | 
			
		||||
    {
 | 
			
		||||
        public static NaviteTuple<T1, T2> Create<T1, T2>(T1 item1, T2 item2) => new NaviteTuple<T1, T2>(item1, item2);
 | 
			
		||||
        public static NaviteTuple<T1, T2, T3> Create<T1, T2, T3>(T1 item1, T2 item2, T3 item3) => new NaviteTuple<T1, T2, T3>(item1, item2, item3);
 | 
			
		||||
        public static NaviteTuple<T1, T2, T3, T4> Create<T1, T2, T3, T4>(T1 item1, T2 item2, T3 item3, T4 item4) => new NaviteTuple<T1, T2, T3, T4>(item1, item2, item3, item4);
 | 
			
		||||
        public static NaviteTuple<T1, T2, T3, T4, T5> Create<T1, T2, T3, T4, T5>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5) => new NaviteTuple<T1, T2, T3, T4, T5>(item1, item2, item3, item4, item5);
 | 
			
		||||
        public static NaviteTuple<T1, T2, T3, T4, T5, T6> Create<T1, T2, T3, T4, T5, T6>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6) => new NaviteTuple<T1, T2, T3, T4, T5, T6>(item1, item2, item3, item4, item5, item6);
 | 
			
		||||
        public static NaviteTuple<T1, T2, T3, T4, T5, T6, T7> Create<T1, T2, T3, T4, T5, T6, T7>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7) => new NaviteTuple<T1, T2, T3, T4, T5, T6, T7>(item1, item2, item3, item4, item5, item6, item7);
 | 
			
		||||
        public static NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8> Create<T1, T2, T3, T4, T5, T6, T7, T8>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8) => new NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8>(item1, item2, item3, item4, item5, item6, item7, item8);
 | 
			
		||||
        public static NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> Create<T1, T2, T3, T4, T5, T6, T7, T8, T9>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8, T9 item9) => new NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>(item1, item2, item3, item4, item5, item6, item7, item8, item9);
 | 
			
		||||
        public static NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Create<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8, T9 item9, T10 item10) => new NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(item1, item2, item3, item4, item5, item6, item7, item8, item9, item10);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class NaviteTuple<T1, T2>
 | 
			
		||||
    {
 | 
			
		||||
        public T1 Item1 { get; }
 | 
			
		||||
        public T2 Item2 { get; }
 | 
			
		||||
        public NaviteTuple(T1 item1, T2 item2)
 | 
			
		||||
        {
 | 
			
		||||
            Item1 = item1;
 | 
			
		||||
            Item2 = item2;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    public class NaviteTuple<T1, T2, T3>
 | 
			
		||||
    {
 | 
			
		||||
        public T1 Item1 { get; }
 | 
			
		||||
        public T2 Item2 { get; }
 | 
			
		||||
        public T3 Item3 { get; }
 | 
			
		||||
        public NaviteTuple(T1 item1, T2 item2, T3 item3)
 | 
			
		||||
        {
 | 
			
		||||
            Item1 = item1;
 | 
			
		||||
            Item2 = item2;
 | 
			
		||||
            Item3 = item3;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    public class NaviteTuple<T1, T2, T3, T4>
 | 
			
		||||
    {
 | 
			
		||||
        public T1 Item1 { get; }
 | 
			
		||||
        public T2 Item2 { get; }
 | 
			
		||||
        public T3 Item3 { get; }
 | 
			
		||||
        public T4 Item4 { get; }
 | 
			
		||||
        public NaviteTuple(T1 item1, T2 item2, T3 item3, T4 item4)
 | 
			
		||||
        {
 | 
			
		||||
            Item1 = item1;
 | 
			
		||||
            Item2 = item2;
 | 
			
		||||
            Item3 = item3;
 | 
			
		||||
            Item4 = item4;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    public class NaviteTuple<T1, T2, T3, T4, T5>
 | 
			
		||||
    {
 | 
			
		||||
        public T1 Item1 { get; }
 | 
			
		||||
        public T2 Item2 { get; }
 | 
			
		||||
        public T3 Item3 { get; }
 | 
			
		||||
        public T4 Item4 { get; }
 | 
			
		||||
        public T5 Item5 { get; }
 | 
			
		||||
        public NaviteTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5)
 | 
			
		||||
        {
 | 
			
		||||
            Item1 = item1;
 | 
			
		||||
            Item2 = item2;
 | 
			
		||||
            Item3 = item3;
 | 
			
		||||
            Item4 = item4;
 | 
			
		||||
            Item5 = item5;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    public class NaviteTuple<T1, T2, T3, T4, T5, T6>
 | 
			
		||||
    {
 | 
			
		||||
        public T1 Item1 { get; }
 | 
			
		||||
        public T2 Item2 { get; }
 | 
			
		||||
        public T3 Item3 { get; }
 | 
			
		||||
        public T4 Item4 { get; }
 | 
			
		||||
        public T5 Item5 { get; }
 | 
			
		||||
        public T6 Item6 { get; }
 | 
			
		||||
        public NaviteTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6)
 | 
			
		||||
        {
 | 
			
		||||
            Item1 = item1;
 | 
			
		||||
            Item2 = item2;
 | 
			
		||||
            Item3 = item3;
 | 
			
		||||
            Item4 = item4;
 | 
			
		||||
            Item5 = item5;
 | 
			
		||||
            Item6 = item6;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    public class NaviteTuple<T1, T2, T3, T4, T5, T6, T7>
 | 
			
		||||
    {
 | 
			
		||||
        public T1 Item1 { get; }
 | 
			
		||||
        public T2 Item2 { get; }
 | 
			
		||||
        public T3 Item3 { get; }
 | 
			
		||||
        public T4 Item4 { get; }
 | 
			
		||||
        public T5 Item5 { get; }
 | 
			
		||||
        public T6 Item6 { get; }
 | 
			
		||||
        public T7 Item7 { get; }
 | 
			
		||||
        public NaviteTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7)
 | 
			
		||||
        {
 | 
			
		||||
            Item1 = item1;
 | 
			
		||||
            Item2 = item2;
 | 
			
		||||
            Item3 = item3;
 | 
			
		||||
            Item4 = item4;
 | 
			
		||||
            Item5 = item5;
 | 
			
		||||
            Item6 = item6;
 | 
			
		||||
            Item7 = item7;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    public class NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8>
 | 
			
		||||
    {
 | 
			
		||||
        public T1 Item1 { get; }
 | 
			
		||||
        public T2 Item2 { get; }
 | 
			
		||||
        public T3 Item3 { get; }
 | 
			
		||||
        public T4 Item4 { get; }
 | 
			
		||||
        public T5 Item5 { get; }
 | 
			
		||||
        public T6 Item6 { get; }
 | 
			
		||||
        public T7 Item7 { get; }
 | 
			
		||||
        public T8 Item8 { get; }
 | 
			
		||||
        public NaviteTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8)
 | 
			
		||||
        {
 | 
			
		||||
            Item1 = item1;
 | 
			
		||||
            Item2 = item2;
 | 
			
		||||
            Item3 = item3;
 | 
			
		||||
            Item4 = item4;
 | 
			
		||||
            Item5 = item5;
 | 
			
		||||
            Item6 = item6;
 | 
			
		||||
            Item7 = item7;
 | 
			
		||||
            Item8 = item8;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    public class NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>
 | 
			
		||||
    {
 | 
			
		||||
        public T1 Item1 { get; }
 | 
			
		||||
        public T2 Item2 { get; }
 | 
			
		||||
        public T3 Item3 { get; }
 | 
			
		||||
        public T4 Item4 { get; }
 | 
			
		||||
        public T5 Item5 { get; }
 | 
			
		||||
        public T6 Item6 { get; }
 | 
			
		||||
        public T7 Item7 { get; }
 | 
			
		||||
        public T8 Item8 { get; }
 | 
			
		||||
        public T9 Item9 { get; }
 | 
			
		||||
        public NaviteTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8, T9 item9)
 | 
			
		||||
        {
 | 
			
		||||
            Item1 = item1;
 | 
			
		||||
            Item2 = item2;
 | 
			
		||||
            Item3 = item3;
 | 
			
		||||
            Item4 = item4;
 | 
			
		||||
            Item5 = item5;
 | 
			
		||||
            Item6 = item6;
 | 
			
		||||
            Item7 = item7;
 | 
			
		||||
            Item8 = item8;
 | 
			
		||||
            Item9 = item9;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    public class NaviteTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
 | 
			
		||||
    {
 | 
			
		||||
        public T1 Item1 { get; }
 | 
			
		||||
        public T2 Item2 { get; }
 | 
			
		||||
        public T3 Item3 { get; }
 | 
			
		||||
        public T4 Item4 { get; }
 | 
			
		||||
        public T5 Item5 { get; }
 | 
			
		||||
        public T6 Item6 { get; }
 | 
			
		||||
        public T7 Item7 { get; }
 | 
			
		||||
        public T8 Item8 { get; }
 | 
			
		||||
        public T9 Item9 { get; }
 | 
			
		||||
        public T10 Item10 { get; }
 | 
			
		||||
        public NaviteTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8, T9 item9, T10 item10)
 | 
			
		||||
        {
 | 
			
		||||
            Item1 = item1;
 | 
			
		||||
            Item2 = item2;
 | 
			
		||||
            Item3 = item3;
 | 
			
		||||
            Item4 = item4;
 | 
			
		||||
            Item5 = item5;
 | 
			
		||||
            Item6 = item6;
 | 
			
		||||
            Item7 = item7;
 | 
			
		||||
            Item8 = item8;
 | 
			
		||||
            Item9 = item9;
 | 
			
		||||
            Item10 = item10;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -18,4 +18,25 @@ namespace FreeSql.Internal.Model
 | 
			
		||||
        public bool IsEntity { get; set; }
 | 
			
		||||
        public bool IsDefaultCtor { get; set; }
 | 
			
		||||
    }
 | 
			
		||||
    public class ReadAnonymousTypeAfInfo
 | 
			
		||||
    {
 | 
			
		||||
        public ReadAnonymousTypeInfo map { get; }
 | 
			
		||||
        public string field { get; }
 | 
			
		||||
        public ReadAnonymousTypeAfInfo(ReadAnonymousTypeInfo map, string field)
 | 
			
		||||
        {
 | 
			
		||||
            this.map = map;
 | 
			
		||||
            this.field = field;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    public class ReadAnonymousTypeOtherInfo {
 | 
			
		||||
        public string field { get; }
 | 
			
		||||
        public ReadAnonymousTypeInfo read { get; }
 | 
			
		||||
        public List<object> retlist { get; }
 | 
			
		||||
        public ReadAnonymousTypeOtherInfo(string field, ReadAnonymousTypeInfo read, List<object> retlist)
 | 
			
		||||
        {
 | 
			
		||||
            this.field = field;
 | 
			
		||||
            this.read = read;
 | 
			
		||||
            this.retlist = retlist;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -66,7 +66,7 @@ namespace FreeSql.Internal
 | 
			
		||||
                trytb.DbOldName = trytb.DbOldName?.ToUpper();
 | 
			
		||||
            }
 | 
			
		||||
            if (tbattr != null) trytb.DisableSyncStructure = tbattr.DisableSyncStructure;
 | 
			
		||||
            var propsLazy = new List<(PropertyInfo, bool, bool)>();
 | 
			
		||||
            var propsLazy = new List<NaviteTuple<PropertyInfo, bool, bool>>();
 | 
			
		||||
            var propsNavObjs = new List<PropertyInfo>();
 | 
			
		||||
            var propsComment = CommonUtils.GetProperyCommentBySummary(entity);
 | 
			
		||||
            var columnsList = new List<ColumnInfo>();
 | 
			
		||||
@@ -87,7 +87,7 @@ namespace FreeSql.Internal
 | 
			
		||||
                        var getIsVirtual = p.GetGetMethod()?.IsVirtual;// trytb.Type.GetMethod($"get_{p.Name}")?.IsVirtual;
 | 
			
		||||
                        var setIsVirtual = setMethod?.IsVirtual;
 | 
			
		||||
                        if (getIsVirtual == true || setIsVirtual == true)
 | 
			
		||||
                            propsLazy.Add((p, getIsVirtual == true, setIsVirtual == true));
 | 
			
		||||
                            propsLazy.Add(NaviteTuple.Create(p, getIsVirtual == true, setIsVirtual == true));
 | 
			
		||||
                    }
 | 
			
		||||
                    propsNavObjs.Add(p);
 | 
			
		||||
                    continue;
 | 
			
		||||
@@ -97,8 +97,8 @@ namespace FreeSql.Internal
 | 
			
		||||
                    colattr = new ColumnAttribute
 | 
			
		||||
                    {
 | 
			
		||||
                        Name = p.Name,
 | 
			
		||||
                        DbType = tp.Value.dbtypeFull,
 | 
			
		||||
                        IsNullable = tp.Value.isnullable ?? true,
 | 
			
		||||
                        DbType = tp.dbtypeFull,
 | 
			
		||||
                        IsNullable = tp.isnullable ?? true,
 | 
			
		||||
                        MapType = p.PropertyType
 | 
			
		||||
                    };
 | 
			
		||||
                if (colattr._IsNullable == null) colattr._IsNullable = tp?.isnullable;
 | 
			
		||||
@@ -111,7 +111,7 @@ namespace FreeSql.Internal
 | 
			
		||||
                else
 | 
			
		||||
                    colattr.DbType = colattr.DbType.ToUpper();
 | 
			
		||||
 | 
			
		||||
                if (colattr._IsNullable == null && tp != null && tp.Value.isnullable == null) colattr.IsNullable = tp.Value.dbtypeFull.Contains("NOT NULL") == false;
 | 
			
		||||
                if (colattr._IsNullable == null && tp != null && tp.isnullable == null) colattr.IsNullable = tp.dbtypeFull.Contains("NOT NULL") == false;
 | 
			
		||||
                if (colattr.DbType?.Contains("NOT NULL") == true) colattr.IsNullable = false;
 | 
			
		||||
                if (string.IsNullOrEmpty(colattr.Name)) colattr.Name = p.Name;
 | 
			
		||||
                if (common.CodeFirst.IsSyncStructureToLower) colattr.Name = colattr.Name.ToLower();
 | 
			
		||||
@@ -419,7 +419,7 @@ namespace FreeSql.Internal
 | 
			
		||||
            foreach (var pnv in propsNavObjs)
 | 
			
		||||
            {
 | 
			
		||||
                var vp = propsLazy.Where(a => a.Item1 == pnv).FirstOrDefault();
 | 
			
		||||
                var isLazy = vp.Item1 != null && !string.IsNullOrEmpty(trytbTypeLazyName);
 | 
			
		||||
                var isLazy = vp != null && vp.Item1 != null && !string.IsNullOrEmpty(trytbTypeLazyName);
 | 
			
		||||
 | 
			
		||||
                AddTableRef(common, trytb, pnv, isLazy, vp, cscode);
 | 
			
		||||
            }
 | 
			
		||||
@@ -445,7 +445,7 @@ namespace FreeSql.Internal
 | 
			
		||||
 | 
			
		||||
            return tbc.TryGetValue(entity, out var trytb2) ? trytb2 : trytb;
 | 
			
		||||
        }
 | 
			
		||||
        public static void AddTableRef(CommonUtils common, TableInfo trytb, PropertyInfo pnv, bool isLazy, (PropertyInfo, bool, bool)? vp, StringBuilder cscode)
 | 
			
		||||
        public static void AddTableRef(CommonUtils common, TableInfo trytb, PropertyInfo pnv, bool isLazy, NaviteTuple<PropertyInfo, bool, bool> vp, StringBuilder cscode)
 | 
			
		||||
        {
 | 
			
		||||
            var trytbTypeName = trytb.Type.IsNested ? $"{trytb.Type.DeclaringType.Namespace?.NotNullAndConcat(".")}{trytb.Type.DeclaringType.Name}.{trytb.Type.Name}" : $"{trytb.Type.Namespace?.NotNullAndConcat(".")}{trytb.Type.Name}";
 | 
			
		||||
            var propTypeName = pnv.PropertyType.IsGenericType ?
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user