mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 09:44:39 +08:00
-
This commit is contained in:
@@ -27,6 +27,31 @@ namespace SqlSugar
|
||||
SqlBuilder.LambadaQueryBuilder.Clear();
|
||||
}
|
||||
|
||||
public ISugarQueryable<T> AddParameters(object pars)
|
||||
{
|
||||
AddPars(pars, Context);
|
||||
return this;
|
||||
}
|
||||
public ISugarQueryable<T> AddParameters(SugarParameter[] pars)
|
||||
{
|
||||
AddPars(pars, Context);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ISugarQueryable<T> AddJoinInfo(string tableName, string shortName, string Joinwhere, JoinType type)
|
||||
{
|
||||
SqlBuilder.LambadaQueryBuilder.JoinIndex = +1;
|
||||
SqlBuilder.LambadaQueryBuilder.JoinQueryInfos
|
||||
.Add(new JoinQueryInfo()
|
||||
{
|
||||
JoinIndex = SqlBuilder.LambadaQueryBuilder.JoinIndex,
|
||||
TableName = tableName,
|
||||
ShortName = shortName,
|
||||
JoinType = type
|
||||
});
|
||||
return this;
|
||||
}
|
||||
|
||||
public virtual ISugarQueryable<T> Where(Expression<Func<T, bool>> expression)
|
||||
{
|
||||
var type = ResolveExpressType.WhereSingle;
|
||||
@@ -34,19 +59,19 @@ namespace SqlSugar
|
||||
{
|
||||
type = ResolveExpressType.WhereMultiple;
|
||||
}
|
||||
base.Where<T>(expression, type, this.Context,this.SqlBuilder);
|
||||
base.Where<T>(expression, type, this.Context, this.SqlBuilder);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ISugarQueryable<T> Where(string whereString, object whereObj = null)
|
||||
{
|
||||
base.Where<T>(whereString, whereObj, this.Context,this.SqlBuilder);
|
||||
base.Where<T>(whereString, whereObj, this.Context, this.SqlBuilder);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ISugarQueryable<T> Where<T2>(string whereString, object whereObj = null) where T2 : class, new()
|
||||
{
|
||||
base.Where<T2>(whereString, whereObj, this.Context,this.SqlBuilder);
|
||||
base.Where<T2>(whereString, whereObj, this.Context, this.SqlBuilder);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -210,7 +235,7 @@ namespace SqlSugar
|
||||
var reval = InstanceFactory.GetQueryable<TResult>(this.Context.CurrentConnectionConfig);
|
||||
reval.Context = this.Context;
|
||||
reval.SqlBuilder = this.SqlBuilder;
|
||||
base.SetSelectType(reval.Context,this.SqlBuilder);
|
||||
base.SetSelectType(reval.Context, this.SqlBuilder);
|
||||
SqlBuilder.LambadaQueryBuilder.SelectValue = expression;
|
||||
reval.Pars = this.Pars;
|
||||
return reval;
|
||||
@@ -221,14 +246,14 @@ namespace SqlSugar
|
||||
var reval = InstanceFactory.GetQueryable<TResult>(this.Context.CurrentConnectionConfig);
|
||||
reval.Context = this.Context;
|
||||
reval.SqlBuilder = this.SqlBuilder;
|
||||
base.SetSelectType(reval.Context,this.SqlBuilder);
|
||||
base.SetSelectType(reval.Context, this.SqlBuilder);
|
||||
SqlBuilder.LambadaQueryBuilder.SelectValue = selectValue;
|
||||
reval.Pars = this.Pars;
|
||||
return reval;
|
||||
}
|
||||
public ISugarQueryable<T> Select(string selectValue)
|
||||
{
|
||||
base.SetSelectType(this.Context,this.SqlBuilder);
|
||||
base.SetSelectType(this.Context, this.SqlBuilder);
|
||||
SqlBuilder.LambadaQueryBuilder.SelectValue = selectValue;
|
||||
return this;
|
||||
}
|
||||
|
@@ -13,6 +13,9 @@ namespace SqlSugar
|
||||
ISqlBuilder SqlBuilder { get; set; }
|
||||
List<SugarParameter> Pars { get; set; }
|
||||
|
||||
ISugarQueryable<T> AddParameters(object pars);
|
||||
ISugarQueryable<T> AddParameters(SugarParameter[] pars);
|
||||
ISugarQueryable<T> AddJoinInfo(string tableName, string shortName, string Joinwhere, JoinType types);
|
||||
|
||||
ISugarQueryable<T> Where(Expression<Func<T, bool>> expression);
|
||||
ISugarQueryable<T> Where(string whereString, object whereObj = null);
|
||||
|
Reference in New Issue
Block a user