mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-16 04:59:34 +08:00
Add Queryable.Where(+3)
This commit is contained in:
parent
4b54a57a2e
commit
01b2a4636f
@ -329,7 +329,15 @@ namespace SqlSugar
|
|||||||
CallContext.MapperExpression.Value.Add(new MapperExpression() { SqlBuilder = SqlBuilder, QueryBuilder = this.QueryBuilder, Type = MapperExpressionType.oneToOne, FillExpression = mapperObject, MappingField1Expression = mapperField, Context = this.Context });
|
CallContext.MapperExpression.Value.Add(new MapperExpression() { SqlBuilder = SqlBuilder, QueryBuilder = this.QueryBuilder, Type = MapperExpressionType.oneToOne, FillExpression = mapperObject, MappingField1Expression = mapperField, Context = this.Context });
|
||||||
return _Mapper<TObject>(mapperObject, mapperField);
|
return _Mapper<TObject>(mapperObject, mapperField);
|
||||||
}
|
}
|
||||||
|
public ISugarQueryable<T> Where(string fieldName, string conditionalType, object fieldValue)
|
||||||
|
{
|
||||||
|
string parameterName = fieldName+ this.QueryBuilder.WhereIndex;
|
||||||
|
var whereSql = this.SqlBuilder.GetWhere(fieldName, conditionalType, this.QueryBuilder.WhereIndex);
|
||||||
|
this.Where(whereSql);
|
||||||
|
this.QueryBuilder.WhereIndex++;
|
||||||
|
this.QueryBuilder.Parameters.Add(new SugarParameter(parameterName, fieldValue));
|
||||||
|
return this;
|
||||||
|
}
|
||||||
public virtual ISugarQueryable<T> AddParameters(object parameters)
|
public virtual ISugarQueryable<T> AddParameters(object parameters)
|
||||||
{
|
{
|
||||||
if (parameters != null)
|
if (parameters != null)
|
||||||
|
@ -59,6 +59,7 @@ namespace SqlSugar
|
|||||||
ISugarQueryable<T> Where(string whereString, object parameters = null);
|
ISugarQueryable<T> Where(string whereString, object parameters = null);
|
||||||
ISugarQueryable<T> Where(List<IConditionalModel> conditionalModels);
|
ISugarQueryable<T> Where(List<IConditionalModel> conditionalModels);
|
||||||
ISugarQueryable<T> Where(List<IConditionalModel> conditionalModels,bool isWrap);
|
ISugarQueryable<T> Where(List<IConditionalModel> conditionalModels,bool isWrap);
|
||||||
|
ISugarQueryable<T> Where(string fieldName, string conditionalType, object fieldValue);
|
||||||
ISugarQueryable<T> Having(Expression<Func<T, bool>> expression);
|
ISugarQueryable<T> Having(Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T> HavingIF(bool isHaving,Expression<Func<T, bool>> expression);
|
ISugarQueryable<T> HavingIF(bool isHaving,Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T> Having(string whereString, object parameters = null);
|
ISugarQueryable<T> Having(string whereString, object parameters = null);
|
||||||
|
Loading…
Reference in New Issue
Block a user