mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Remove T Check
This commit is contained in:
parent
221eac6dcb
commit
6f86ce007f
@ -20,6 +20,16 @@ namespace OrmTest.Demo
|
||||
SelectMerge();
|
||||
ConditionalModel();
|
||||
JoinExp();
|
||||
Clone();
|
||||
}
|
||||
|
||||
private static void Clone()
|
||||
{
|
||||
//var db = GetInstance();
|
||||
//var qy = db.Queryable<Student>().Where(it => 1 == 1);
|
||||
|
||||
//var list1 =qy.Clone<Student>().Where(it => it.Id == 1).ToList();
|
||||
//var list2 = qy.Clone<Student>().Where(it => it.Id == 2).ToList();
|
||||
}
|
||||
|
||||
private static void JoinExp()
|
||||
|
@ -247,12 +247,12 @@ namespace SqlSugar
|
||||
#endregion
|
||||
|
||||
#region Create Instance
|
||||
protected ISugarQueryable<T> CreateQueryable<T>() where T : class, new()
|
||||
protected ISugarQueryable<T> CreateQueryable<T>()
|
||||
{
|
||||
ISugarQueryable<T> result = InstanceFactory.GetQueryable<T>(this.CurrentConnectionConfig);
|
||||
return CreateQueryable(result);
|
||||
}
|
||||
protected ISugarQueryable<T> CreateQueryable<T>(ISugarQueryable<T> result) where T : class, new()
|
||||
protected ISugarQueryable<T> CreateQueryable<T>(ISugarQueryable<T> result)
|
||||
{
|
||||
var sqlBuilder = InstanceFactory.GetSqlbuilder(CurrentConnectionConfig);
|
||||
result.Context = this.Context;
|
||||
@ -308,7 +308,7 @@ namespace SqlSugar
|
||||
return result;
|
||||
}
|
||||
|
||||
protected void CreateQueryJoin<T>(Expression joinExpression, Type[] types, ISugarQueryable<T> queryable) where T : class, new()
|
||||
protected void CreateQueryJoin<T>(Expression joinExpression, Type[] types, ISugarQueryable<T> queryable)
|
||||
{
|
||||
this.CreateQueryable<T>(queryable);
|
||||
string shortName = string.Empty;
|
||||
@ -321,7 +321,7 @@ namespace SqlSugar
|
||||
queryable.SqlBuilder.QueryBuilder.Parameters.AddRange(paramters);
|
||||
}
|
||||
}
|
||||
protected void CreateEasyQueryJoin<T>(Expression joinExpression, Type[] types, ISugarQueryable<T> queryable) where T : class, new()
|
||||
protected void CreateEasyQueryJoin<T>(Expression joinExpression, Type[] types, ISugarQueryable<T> queryable)
|
||||
{
|
||||
this.CreateQueryable<T>(queryable);
|
||||
string shortName = string.Empty;
|
||||
|
@ -104,7 +104,7 @@ namespace SqlSugar
|
||||
/// <summary>
|
||||
/// Lambda Query operation
|
||||
/// </summary>
|
||||
public virtual ISugarQueryable<T> Queryable<T>() where T : class, new()
|
||||
public virtual ISugarQueryable<T> Queryable<T>()
|
||||
{
|
||||
|
||||
InitMppingInfo<T>();
|
||||
@ -114,7 +114,7 @@ namespace SqlSugar
|
||||
/// <summary>
|
||||
/// Lambda Query operation
|
||||
/// </summary>
|
||||
public virtual ISugarQueryable<T> Queryable<T>(string shortName) where T : class, new()
|
||||
public virtual ISugarQueryable<T> Queryable<T>(string shortName)
|
||||
{
|
||||
var queryable = Queryable<T>();
|
||||
queryable.SqlBuilder.QueryBuilder.TableShortName = shortName;
|
||||
@ -130,7 +130,7 @@ namespace SqlSugar
|
||||
queryable.SqlBuilder.QueryBuilder.TableShortName = shortName;
|
||||
return queryable;
|
||||
}
|
||||
public virtual ISugarQueryable<T, T2> Queryable<T, T2>(Expression<Func<T, T2, object[]>> joinExpression) where T : class, new()
|
||||
public virtual ISugarQueryable<T, T2> Queryable<T, T2>(Expression<Func<T, T2, object[]>> joinExpression)
|
||||
{
|
||||
InitMppingInfo<T, T2>();
|
||||
var types = new Type[] { typeof(T2) };
|
||||
@ -138,7 +138,7 @@ namespace SqlSugar
|
||||
this.CreateQueryJoin(joinExpression, types, queryable);
|
||||
return queryable;
|
||||
}
|
||||
public virtual ISugarQueryable<T, T2, T3> Queryable<T, T2, T3>(Expression<Func<T, T2, T3, object[]>> joinExpression) where T : class, new()
|
||||
public virtual ISugarQueryable<T, T2, T3> Queryable<T, T2, T3>(Expression<Func<T, T2, T3, object[]>> joinExpression)
|
||||
{
|
||||
InitMppingInfo<T, T2, T3>();
|
||||
var types = new Type[] { typeof(T2), typeof(T3) };
|
||||
@ -146,7 +146,7 @@ namespace SqlSugar
|
||||
this.CreateQueryJoin(joinExpression, types, queryable);
|
||||
return queryable;
|
||||
}
|
||||
public virtual ISugarQueryable<T, T2, T3, T4> Queryable<T, T2, T3, T4>(Expression<Func<T, T2, T3, T4, object[]>> joinExpression) where T : class, new()
|
||||
public virtual ISugarQueryable<T, T2, T3, T4> Queryable<T, T2, T3, T4>(Expression<Func<T, T2, T3, T4, object[]>> joinExpression)
|
||||
{
|
||||
InitMppingInfo<T, T2, T3, T4>();
|
||||
var types = new Type[] { typeof(T2), typeof(T3), typeof(T4) };
|
||||
@ -154,7 +154,7 @@ namespace SqlSugar
|
||||
this.CreateQueryJoin(joinExpression, types, queryable);
|
||||
return queryable;
|
||||
}
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5> Queryable<T, T2, T3, T4, T5>(Expression<Func<T, T2, T3, T4, T5, object[]>> joinExpression) where T : class, new()
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5> Queryable<T, T2, T3, T4, T5>(Expression<Func<T, T2, T3, T4, T5, object[]>> joinExpression)
|
||||
{
|
||||
InitMppingInfo<T, T2, T3, T4, T5>();
|
||||
var types = new Type[] { typeof(T2), typeof(T3), typeof(T4), typeof(T5) };
|
||||
@ -162,7 +162,7 @@ namespace SqlSugar
|
||||
this.CreateQueryJoin(joinExpression, types, queryable);
|
||||
return queryable;
|
||||
}
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6> Queryable<T, T2, T3, T4, T5, T6>(Expression<Func<T, T2, T3, T4, T5, T6, object[]>> joinExpression) where T : class, new()
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6> Queryable<T, T2, T3, T4, T5, T6>(Expression<Func<T, T2, T3, T4, T5, T6, object[]>> joinExpression)
|
||||
{
|
||||
InitMppingInfo<T, T2, T3, T4, T5, T6>();
|
||||
var types = new Type[] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6) };
|
||||
@ -170,7 +170,7 @@ namespace SqlSugar
|
||||
this.CreateQueryJoin(joinExpression, types, queryable);
|
||||
return queryable;
|
||||
}
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6, T7> Queryable<T, T2, T3, T4, T5, T6, T7>(Expression<Func<T, T2, T3, T4, T5, T6, T7, object[]>> joinExpression) where T : class, new()
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6, T7> Queryable<T, T2, T3, T4, T5, T6, T7>(Expression<Func<T, T2, T3, T4, T5, T6, T7, object[]>> joinExpression)
|
||||
{
|
||||
InitMppingInfo<T, T2, T3, T4, T5, T6, T7>();
|
||||
var types = new Type[] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7) };
|
||||
@ -178,7 +178,7 @@ namespace SqlSugar
|
||||
this.CreateQueryJoin(joinExpression, types, queryable);
|
||||
return queryable;
|
||||
}
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> Queryable<T, T2, T3, T4, T5, T6, T7, T8>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, object[]>> joinExpression) where T : class, new()
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> Queryable<T, T2, T3, T4, T5, T6, T7, T8>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, object[]>> joinExpression)
|
||||
{
|
||||
InitMppingInfo<T, T2, T3, T4, T5, T6, T7, T8>();
|
||||
var types = new Type[] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8) };
|
||||
@ -187,7 +187,7 @@ namespace SqlSugar
|
||||
return queryable;
|
||||
}
|
||||
#region 9-12
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9> Queryable<T, T2, T3, T4, T5, T6, T7, T8, T9>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, object[]>> joinExpression) where T : class, new()
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9> Queryable<T, T2, T3, T4, T5, T6, T7, T8, T9>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, object[]>> joinExpression)
|
||||
{
|
||||
InitMppingInfo<T, T2, T3, T4, T5, T6, T7, T8, T9>();
|
||||
var types = new Type[] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9) };
|
||||
@ -195,7 +195,7 @@ namespace SqlSugar
|
||||
this.CreateQueryJoin(joinExpression, types, queryable);
|
||||
return queryable;
|
||||
}
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10> Queryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, object[]>> joinExpression) where T : class, new()
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10> Queryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, object[]>> joinExpression)
|
||||
{
|
||||
InitMppingInfo<T, T2, T3, T4, T5, T6, T7, T8, T9, T10>();
|
||||
var types = new Type[] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10) };
|
||||
@ -203,7 +203,7 @@ namespace SqlSugar
|
||||
this.CreateQueryJoin(joinExpression, types, queryable);
|
||||
return queryable;
|
||||
}
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Queryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, object[]>> joinExpression) where T : class, new()
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Queryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, object[]>> joinExpression)
|
||||
{
|
||||
InitMppingInfo<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>();
|
||||
var types = new Type[] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11) };
|
||||
@ -211,7 +211,7 @@ namespace SqlSugar
|
||||
this.CreateQueryJoin(joinExpression, types, queryable);
|
||||
return queryable;
|
||||
}
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Queryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, object[]>> joinExpression) where T : class, new()
|
||||
public virtual ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Queryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, object[]>> joinExpression)
|
||||
{
|
||||
InitMppingInfo<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>();
|
||||
var types = new Type[] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12) };
|
||||
|
Loading…
Reference in New Issue
Block a user