mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 13:47:03 +08:00
-
This commit is contained in:
parent
9ade137290
commit
40f93b2109
@ -14,12 +14,9 @@ namespace OrmTest.Models
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "ID")]
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public int SchoolId { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
[SugarColumn(MappingKeys = "id,SchoolId")]
|
||||
public virtual School School { get; set; }
|
||||
[SugarColumn(IsIgnore=true)]
|
||||
public int TestId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -35,29 +35,26 @@ namespace OrmTest.UnitTest
|
||||
Console.WriteLine(sql + " " + pars);
|
||||
};
|
||||
|
||||
|
||||
#region dr ot entity
|
||||
db.IgnoreComumns.Add("TestId", "Student");
|
||||
var dr2 = db.Queryable<Student>().Select(it => new { newid = it.Id, obj = it }).ToList();
|
||||
var dr1 = db.Queryable<Student>().Select(it => new { newid = it.Id }).ToList();
|
||||
var x=db.RewritableMethods.SerializeObject(new { newid = 1, obj = new School() { Id = 1 } });
|
||||
#endregion
|
||||
|
||||
|
||||
#region sql and parameters validate
|
||||
var l1 = db.Queryable<School, School>((st, st2) => new object[] {
|
||||
JoinType.Left,st.Id==st2.Id
|
||||
})
|
||||
.Where(st => st.Id > 0)
|
||||
.Select<School, School, dynamic>((st, st2) => new {stid = st.Id, scId = st2.Id,xx=st }).ToSql();
|
||||
.Where(st => st.Id > 0)
|
||||
.Select<School, School, dynamic>((st, st2) => new { stid = st.Id, scId = st2.Id, xx = st }).ToSql();
|
||||
|
||||
base.Check("SELECT [st].[Id] AS [stid] , [st2].[Id] AS [scId] , [st].[Id] AS [xx_Id] , [st].[Name] AS [xx_Name] FROM [School] st Left JOIN School st2 ON ( [st].[Id] = [st2].[Id] ) WHERE ( [st].[Id] > @Id0 )"
|
||||
, new List<SugarParameter>() {
|
||||
new SugarParameter("@Id0",0)
|
||||
},l1.Key,l1.Value, "l1错误");
|
||||
|
||||
var l2 = db.Queryable<School, School>((st, st2) => new object[] {
|
||||
JoinType.Left,st.Id==st2.Id
|
||||
}).Where<Student, School>((st, st2) => st2.Id > 2)
|
||||
.Select(st => new ViewModelStudent { School = st }).ToSql();
|
||||
|
||||
base.Check("SELECT [st].[Id] AS [School_Id] , [st].[Name] AS [School_Name] FROM [School] st Left JOIN School st2 ON ( [st].[Id] = [st2].[Id] ) WHERE ( [st2].[Id] > @Id0 )",
|
||||
new List<SugarParameter>() { new SugarParameter("@Id0", 2) },
|
||||
l2.Key,
|
||||
l2.Value,
|
||||
"l2报错"
|
||||
);
|
||||
|
||||
}, l1.Key, l1.Value, "l1错误");
|
||||
|
||||
var list2 = db.Queryable<Student>()
|
||||
.Where(st => st.Id > 0)
|
||||
@ -81,6 +78,9 @@ namespace OrmTest.UnitTest
|
||||
.Where("st.id>@id")
|
||||
.AddParameters(new { id = 1 })
|
||||
.Select("st.*").ToList();
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
@ -282,7 +281,7 @@ namespace SqlSugar
|
||||
}
|
||||
else
|
||||
{
|
||||
action(sql, JsonConvert.SerializeObject(pars.Select(it => new { key = it.ParameterName, value = it.Value.ObjToString() })));
|
||||
action(sql,this.Context.RewritableMethods.SerializeObject(pars.Select(it => new { key = it.ParameterName, value = it.Value.ObjToString() })));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -351,8 +351,16 @@ namespace SqlSugar
|
||||
var sqlObj =this.ToSql();
|
||||
using (var dataReader = this.Db.GetDataReader(sqlObj.Key, sqlObj.Value.ToArray()))
|
||||
{
|
||||
var reval = this.Bind.DataReaderToList<T>(typeof(T), dataReader, SqlBuilder.LambadaQueryBuilder.SelectCacheKey);
|
||||
return reval;
|
||||
var tType = typeof(T);
|
||||
if (tType.IsAnonymousType())
|
||||
{
|
||||
return this.Context.RewritableMethods.DataReaderToDynamicList<T>(dataReader);
|
||||
}
|
||||
else
|
||||
{
|
||||
var reval = this.Bind.DataReaderToList<T>(tType, dataReader, SqlBuilder.LambadaQueryBuilder.SelectCacheKey);
|
||||
return reval;
|
||||
}
|
||||
}
|
||||
}
|
||||
public string ToJson()
|
||||
@ -410,14 +418,14 @@ namespace SqlSugar
|
||||
type = ResolveExpressType.WhereMultiple;
|
||||
}
|
||||
ILambdaExpressions resolveExpress = this.SqlBuilder.LambadaQueryBuilder.LambdaExpressions;
|
||||
resolveExpress.IgnoreComumnList = this.Context.IgnoreComumns;
|
||||
resolveExpress.MappingColumns = this.Context.MappingColumns;
|
||||
resolveExpress.MappingColumns = this.Context.MappingColumns;
|
||||
resolveExpress.Resolve(expression, type);
|
||||
BasePars.AddRange(resolveExpress.Parameters);
|
||||
SqlBuilder.LambadaQueryBuilder.WhereInfos.Add(SqlBuilder.AppendWhereOrAnd(SqlBuilder.LambadaQueryBuilder.WhereInfos.IsNullOrEmpty(), resolveExpress.Result.GetResultString()));
|
||||
resolveExpress.Clear();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ namespace SqlSugar
|
||||
resolveExpress.JoinQueryInfos = Builder.LambadaQueryBuilder.JoinQueryInfos;
|
||||
resolveExpress.MappingColumns = Context.MappingColumns;
|
||||
resolveExpress.MappingTables = Context.MappingTables;
|
||||
resolveExpress.IgnoreComumnList = Context.IgnoreComumns;
|
||||
resolveExpress.Resolve(expression, ResolveType);
|
||||
this.QueryPars.AddRange(resolveExpress.Parameters);
|
||||
var reval= resolveExpress.Result.GetResultString();
|
||||
|
72
SqlSugar/Common/RewritableMethods.cs
Normal file
72
SqlSugar/Common/RewritableMethods.cs
Normal file
@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Dynamic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
namespace SqlSugar
|
||||
{
|
||||
public class RewritableMethods : IRewritableMethods
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///DataReader to Dynamic
|
||||
/// </summary>
|
||||
/// <param name="reader"></param>
|
||||
/// <returns></returns>
|
||||
public ExpandoObject DataReaderToExpandoObject(IDataReader reader)
|
||||
{
|
||||
ExpandoObject d = new ExpandoObject();
|
||||
for (int i = 0; i < reader.FieldCount; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
((IDictionary<string, object>)d).Add(reader.GetName(i), reader.GetValue(i));
|
||||
}
|
||||
catch
|
||||
{
|
||||
((IDictionary<string, object>)d).Add(reader.GetName(i), null);
|
||||
}
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
public List<T> DataReaderToDynamicList<T>(IDataReader reader)
|
||||
{
|
||||
var list = new List<T>();
|
||||
if (reader != null && !reader.IsClosed)
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
var expandoObject = DataReaderToExpandoObject(reader);
|
||||
var stringValue = SerializeObject(expandoObject);
|
||||
list.Add((T)DeserializeObject<T>(stringValue));
|
||||
}
|
||||
reader.Close();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serialize Object
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public string SerializeObject(object value)
|
||||
{
|
||||
return JsonConvert.SerializeObject(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serialize Object
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public T DeserializeObject<T>(string value)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<T>(value);
|
||||
}
|
||||
}
|
||||
}
|
@ -10,32 +10,32 @@ namespace SqlSugar
|
||||
public SqlSugarException(string message)
|
||||
: base(message){}
|
||||
|
||||
public SqlSugarException(string message, string sql)
|
||||
: base(GetMessage(message, sql)) {}
|
||||
public SqlSugarException(SqlSugarClient context,string message, string sql)
|
||||
: base(GetMessage(context, message, sql)) {}
|
||||
|
||||
public SqlSugarException(string message, string sql, object pars)
|
||||
: base(GetMessage(message, sql, pars)){}
|
||||
public SqlSugarException(SqlSugarClient context, string message, string sql, object pars)
|
||||
: base(GetMessage(context,message, sql, pars)){}
|
||||
|
||||
public SqlSugarException(string message, object pars)
|
||||
: base(GetMessage(message, pars)){}
|
||||
public SqlSugarException(SqlSugarClient context, string message, object pars)
|
||||
: base(GetMessage(context,message, pars)){}
|
||||
|
||||
private static string GetMessage(string message, object pars)
|
||||
private static string GetMessage(SqlSugarClient context, string message, object pars)
|
||||
{
|
||||
var parsStr = string.Empty; ;
|
||||
if (pars != null)
|
||||
{
|
||||
parsStr = JsonConvert.SerializeObject(pars);
|
||||
parsStr = context.RewritableMethods.SerializeObject(pars);
|
||||
}
|
||||
var reval = GetLineMessage("message", message) + GetLineMessage("function", parsStr);
|
||||
return reval;
|
||||
|
||||
}
|
||||
|
||||
private static string GetMessage(string message, string sql, object pars)
|
||||
private static string GetMessage(SqlSugarClient context, string message, string sql, object pars)
|
||||
{
|
||||
if (pars == null)
|
||||
{
|
||||
return GetMessage(message, sql);
|
||||
return GetMessage(context,message, sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
14
SqlSugar/Entities/Mapping/IgnoreComumn.cs
Normal file
14
SqlSugar/Entities/Mapping/IgnoreComumn.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
public class IgnoreComumn
|
||||
{
|
||||
public string EntityName { get; set; }
|
||||
public string EntityPropertyName { get; set; }
|
||||
}
|
||||
}
|
@ -19,6 +19,14 @@ namespace SqlSugar
|
||||
}
|
||||
}
|
||||
|
||||
public class IgnoreComumnList : List<IgnoreComumn> {
|
||||
public void Add(string EntityPropertyName,string EntityName)
|
||||
{
|
||||
this.RemoveAll(it => it.EntityPropertyName.Equals(EntityPropertyName, StringComparison.CurrentCultureIgnoreCase));
|
||||
this.Add(new IgnoreComumn() { EntityPropertyName = EntityPropertyName, EntityName=EntityName});
|
||||
}
|
||||
}
|
||||
|
||||
public class MappingColumnList: List<MappingColumn>
|
||||
{
|
||||
public void Add(string EntityPropertyName, string dbColumnName,string dbTableName)
|
||||
|
@ -21,6 +21,7 @@ namespace SqlSugar
|
||||
public int ParameterIndex { get; set; }
|
||||
public MappingColumnList MappingColumns { get; set; }
|
||||
public MappingTableList MappingTables { get; set; }
|
||||
public IgnoreComumnList IgnoreComumnList { get; set; }
|
||||
public List<JoinQueryInfo> JoinQueryInfos { get; set; }
|
||||
|
||||
public bool IsJoin
|
||||
|
@ -93,6 +93,12 @@ namespace SqlSugar
|
||||
var listProperties = item.Type.GetProperties().Cast<PropertyInfo>().ToList();
|
||||
foreach (var property in listProperties)
|
||||
{
|
||||
if (this.Context.IgnoreComumnList != null
|
||||
&& this.Context.IgnoreComumnList.Any(
|
||||
it => it.EntityName == item.Type.Name && it.EntityPropertyName == property.Name))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (property.PropertyType.IsClass())
|
||||
{
|
||||
|
||||
|
@ -90,6 +90,11 @@ namespace SqlSugar
|
||||
var listProperties = item.Type.GetProperties().Cast<PropertyInfo>().ToList();
|
||||
foreach (var property in listProperties)
|
||||
{
|
||||
if (this.Context.IgnoreComumnList != null
|
||||
&& this.Context.IgnoreComumnList.Any(
|
||||
it => it.EntityName == item.Type.Name&&it.EntityPropertyName==property.Name)) {
|
||||
continue;
|
||||
}
|
||||
if (property.PropertyType.IsClass())
|
||||
{
|
||||
|
||||
|
@ -8,9 +8,10 @@ namespace SqlSugar
|
||||
{
|
||||
public partial interface ILambdaExpressions
|
||||
{
|
||||
MappingColumnList MappingColumns { get; set; }
|
||||
MappingTableList MappingTables { get; set; }
|
||||
List<JoinQueryInfo> JoinQueryInfos { get; set; }
|
||||
MappingColumnList MappingColumns { get; set; }
|
||||
MappingTableList MappingTables { get; set; }
|
||||
IgnoreComumnList IgnoreComumnList { get; set; }
|
||||
List<JoinQueryInfo> JoinQueryInfos { get; set; }
|
||||
SqlSugarClient Context { get; set; }
|
||||
IDbMethods DbMehtods { get; set; }
|
||||
Expression Expression { get; set; }
|
||||
|
29
SqlSugar/Interface/IRewritableMethods.cs
Normal file
29
SqlSugar/Interface/IRewritableMethods.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Dynamic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
public interface IRewritableMethods
|
||||
{
|
||||
ExpandoObject DataReaderToExpandoObject(IDataReader reader);
|
||||
List<T> DataReaderToDynamicList<T>(IDataReader reader);
|
||||
|
||||
/// <summary>
|
||||
/// Serialize Object
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
string SerializeObject(object value);
|
||||
/// <summary>
|
||||
/// Serialize Object
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
T DeserializeObject<T>(string value);
|
||||
}
|
||||
}
|
@ -74,6 +74,7 @@
|
||||
<Compile Include="Common\PubConvert.cs" />
|
||||
<Compile Include="Common\PubMethod.cs" />
|
||||
<Compile Include="Common\SqlException.cs" />
|
||||
<Compile Include="Common\RewritableMethods.cs" />
|
||||
<Compile Include="Databases\SqlServer\CodeFirst\SqlServerCodeFirst.cs" />
|
||||
<Compile Include="Databases\SqlServer\DbType.cs" />
|
||||
<Compile Include="Databases\SqlServer\Db\DbBind\SqlServerDbBind.cs" />
|
||||
@ -87,6 +88,7 @@
|
||||
<Compile Include="Entities\ConnectionConfig.cs" />
|
||||
<Compile Include="Entities\DbColumnInfo.cs" />
|
||||
<Compile Include="Entities\DbTableInfo.cs" />
|
||||
<Compile Include="Entities\Mapping\IgnoreComumn.cs" />
|
||||
<Compile Include="ExpressionsToSql\Common\CommonTempDataType.cs" />
|
||||
<Compile Include="ExpressionsToSql\Common\MethodCallExpressionModel.cs" />
|
||||
<Compile Include="ExpressionsToSql\Method\DefaultDbMethod.cs" />
|
||||
@ -139,6 +141,7 @@
|
||||
<Compile Include="Interface\IQueryable.cs" />
|
||||
<Compile Include="Interface\ISqlBuilder\IDMLBuilder.cs" />
|
||||
<Compile Include="Interface\ISqlBuilder\ISqlBuilder.cs" />
|
||||
<Compile Include="Interface\IRewritableMethods.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SqlSugarAccessory.cs" />
|
||||
<Compile Include="SqlSugarClient.cs" />
|
||||
|
@ -15,11 +15,13 @@ namespace SqlSugar
|
||||
public Guid ContextID { get; set; }
|
||||
public MappingTableList MappingTables = new MappingTableList();
|
||||
public MappingColumnList MappingColumns = new MappingColumnList();
|
||||
public IgnoreComumnList IgnoreComumns = new IgnoreComumnList();
|
||||
|
||||
protected ISqlBuilder _SqlBuilder;
|
||||
protected IDb _Ado;
|
||||
protected ILambdaExpressions _LambdaExpressions;
|
||||
protected object _Sqlable;
|
||||
protected IRewritableMethods _RewritableMethods;
|
||||
|
||||
protected void InitConstructor()
|
||||
{
|
||||
|
@ -91,6 +91,27 @@ namespace SqlSugar
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rewritable Methods
|
||||
/// </summary>
|
||||
public virtual IRewritableMethods RewritableMethods
|
||||
{
|
||||
get
|
||||
{
|
||||
if (base._RewritableMethods == null)
|
||||
{
|
||||
base._RewritableMethods = new RewritableMethods();
|
||||
}
|
||||
return _RewritableMethods;
|
||||
}
|
||||
set
|
||||
{
|
||||
base._RewritableMethods = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region functions
|
||||
/// <summary>
|
||||
/// Lambda Query operation
|
||||
/// </summary>
|
||||
@ -107,11 +128,10 @@ namespace SqlSugar
|
||||
reval.SqlBuilder.LambadaQueryBuilder.LambdaExpressions = InstanceFactory.GetLambdaExpressions(base.CurrentConnectionConfig);
|
||||
return reval;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lambda Query operation
|
||||
/// </summary>
|
||||
public virtual ISugarQueryable<SugarDynamic> Queryable(string tableName,string shortName,string widthString=null)
|
||||
public virtual ISugarQueryable<SugarDynamic> Queryable(string tableName, string shortName, string widthString = null)
|
||||
{
|
||||
var queryable = Queryable<SugarDynamic>();
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.EntityName = tableName;
|
||||
@ -119,7 +139,6 @@ namespace SqlSugar
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.TableWithString = widthString;
|
||||
return queryable;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lambda Query operation
|
||||
/// </summary>
|
||||
@ -134,15 +153,15 @@ namespace SqlSugar
|
||||
{
|
||||
var queryable = Queryable<T>();
|
||||
string shortName = string.Empty;
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this,ref shortName, typeof(T2));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.TableShortName=shortName;
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.TableShortName = shortName;
|
||||
return queryable;
|
||||
}
|
||||
public virtual ISugarQueryable<T> Queryable<T, T2, T3>(Expression<Func<T, T2, T3, object[]>> joinExpression) where T : class, new()
|
||||
{
|
||||
var queryable = Queryable<T>();
|
||||
string shortName = string.Empty;
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2),typeof(T3));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.TableShortName = shortName;
|
||||
return queryable;
|
||||
}
|
||||
@ -150,7 +169,7 @@ namespace SqlSugar
|
||||
{
|
||||
var queryable = Queryable<T>();
|
||||
string shortName = string.Empty;
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3),typeof(T4));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3), typeof(T4));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.TableShortName = shortName;
|
||||
return queryable;
|
||||
}
|
||||
@ -158,7 +177,7 @@ namespace SqlSugar
|
||||
{
|
||||
var queryable = Queryable<T>();
|
||||
string shortName = string.Empty;
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3), typeof(T4),typeof(T5));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3), typeof(T4), typeof(T5));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.TableShortName = shortName;
|
||||
return queryable;
|
||||
}
|
||||
@ -166,7 +185,7 @@ namespace SqlSugar
|
||||
{
|
||||
var queryable = Queryable<T>();
|
||||
string shortName = string.Empty;
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3), typeof(T4), typeof(T5),typeof(T6));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.TableShortName = shortName;
|
||||
return queryable;
|
||||
}
|
||||
@ -174,7 +193,7 @@ namespace SqlSugar
|
||||
{
|
||||
var queryable = Queryable<T>();
|
||||
string shortName = string.Empty;
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6),typeof(T7));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.TableShortName = shortName;
|
||||
return queryable;
|
||||
}
|
||||
@ -182,7 +201,7 @@ namespace SqlSugar
|
||||
{
|
||||
var queryable = Queryable<T>();
|
||||
string shortName = string.Empty;
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7),typeof(T8));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.TableShortName = shortName;
|
||||
return queryable;
|
||||
}
|
||||
@ -190,7 +209,7 @@ namespace SqlSugar
|
||||
{
|
||||
var queryable = Queryable<T>();
|
||||
string shortName = string.Empty;
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8),typeof(T9));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.TableShortName = shortName;
|
||||
return queryable;
|
||||
}
|
||||
@ -198,13 +217,11 @@ namespace SqlSugar
|
||||
{
|
||||
var queryable = Queryable<T>();
|
||||
string shortName = string.Empty;
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9),typeof(T10));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.JoinQueryInfos = base.GetJoinInfos(joinExpression, this, ref shortName, typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10));
|
||||
queryable.SqlBuilder.LambadaQueryBuilder.TableShortName = shortName;
|
||||
return queryable;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region functions
|
||||
public virtual List<T> SqlQuery<T>(string sql, object pars = null)
|
||||
{
|
||||
var dbPars = this.Database.GetParameters(pars);
|
||||
|
Loading…
Reference in New Issue
Block a user