mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 23:13:42 +08:00
Add Queryable.Where(List<ConditionalModel> conditionalModels)
This commit is contained in:
parent
5cd2e7cec9
commit
58ee2ee124
@ -18,7 +18,18 @@ namespace OrmTest.Demo
|
|||||||
Where();
|
Where();
|
||||||
OrderBy();
|
OrderBy();
|
||||||
SelectMerge();
|
SelectMerge();
|
||||||
|
ConditionalModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void ConditionalModel()
|
||||||
|
{
|
||||||
|
var db = GetInstance();
|
||||||
|
List<ConditionalModel> conModels = new List<ConditionalModel>();
|
||||||
|
conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1" });
|
||||||
|
conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Like, FieldValue = "1" });
|
||||||
|
var student = db.Queryable<Student>().Where(conModels).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
private static void SelectMerge()
|
private static void SelectMerge()
|
||||||
{
|
{
|
||||||
var db = GetInstance();
|
var db = GetInstance();
|
||||||
|
@ -25,9 +25,17 @@ namespace SqlSugar
|
|||||||
var isDictionary = entityType.IsIn(UtilConstants.DicArraySO, UtilConstants.DicArraySS);
|
var isDictionary = entityType.IsIn(UtilConstants.DicArraySO, UtilConstants.DicArraySS);
|
||||||
if (isDictionary)
|
if (isDictionary)
|
||||||
DictionaryToParameters(parameters, sqlParameterKeyWord, result, entityType);
|
DictionaryToParameters(parameters, sqlParameterKeyWord, result, entityType);
|
||||||
|
else if (parameters is List<SugarParameter>)
|
||||||
|
{
|
||||||
|
result = (parameters as List<SugarParameter>);
|
||||||
|
}
|
||||||
|
else if (parameters is SugarParameter[])
|
||||||
|
{
|
||||||
|
result = (parameters as SugarParameter[]).ToList();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Check.Exception(!entityType.IsAnonymousType(), "The parameter format is wrong. \nUse new{{xx=xx, xx2=xx2}} or \nDictionary<string, object> or \nSugarParameter [] ");
|
Check.Exception(!entityType.IsAnonymousType(), "The parameter format is wrong. \nUse new{{xx=xx, xx2=xx2}} or \nDictionary<string, object> or \nSugarParameter [] ");
|
||||||
ProperyToParameter(parameters, propertyInfo, sqlParameterKeyWord, result, entityType);
|
ProperyToParameter(parameters, propertyInfo, sqlParameterKeyWord, result, entityType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,6 +121,14 @@ namespace SqlSugar
|
|||||||
this.Where<T>(whereString, whereObj);
|
this.Where<T>(whereString, whereObj);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual ISugarQueryable<T> Where(List<ConditionalModel> conditionalModels)
|
||||||
|
{
|
||||||
|
if (conditionalModels.IsNullOrEmpty()) return this;
|
||||||
|
var sqlObj = this.Context.Utilities.ConditionalModelToSql(conditionalModels);
|
||||||
|
return this.Where(sqlObj.Key, sqlObj.Value);
|
||||||
|
}
|
||||||
|
|
||||||
public virtual ISugarQueryable<T> Where<T2>(string whereString, object whereObj = null)
|
public virtual ISugarQueryable<T> Where<T2>(string whereString, object whereObj = null)
|
||||||
{
|
{
|
||||||
var whereValue = QueryBuilder.WhereInfos;
|
var whereValue = QueryBuilder.WhereInfos;
|
||||||
@ -430,7 +438,7 @@ namespace SqlSugar
|
|||||||
public virtual ISugarQueryable<T> MergeTable()
|
public virtual ISugarQueryable<T> MergeTable()
|
||||||
{
|
{
|
||||||
Check.Exception(this.QueryBuilder.SelectValue.IsNullOrEmpty(), "MergeTable need to use Select(it=>new{}) Method .");
|
Check.Exception(this.QueryBuilder.SelectValue.IsNullOrEmpty(), "MergeTable need to use Select(it=>new{}) Method .");
|
||||||
Check.Exception(this.QueryBuilder.Skip > 0 || this.QueryBuilder.Take > 0||this.QueryBuilder.OrderByValue.IsValuable(), "MergeTable Queryable cannot Take Skip OrderBy PageToList ");
|
Check.Exception(this.QueryBuilder.Skip > 0 || this.QueryBuilder.Take > 0 || this.QueryBuilder.OrderByValue.IsValuable(), "MergeTable Queryable cannot Take Skip OrderBy PageToList ");
|
||||||
var sql = QueryBuilder.ToSqlString();
|
var sql = QueryBuilder.ToSqlString();
|
||||||
var tableName = this.SqlBuilder.GetPackTable(sql, "MergeTable");
|
var tableName = this.SqlBuilder.GetPackTable(sql, "MergeTable");
|
||||||
var mergeQueryable = this.Context.Queryable<ExpandoObject>();
|
var mergeQueryable = this.Context.Queryable<ExpandoObject>();
|
||||||
@ -613,9 +621,9 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
columns.Add(new DbColumnInfo()
|
columns.Add(new DbColumnInfo()
|
||||||
{
|
{
|
||||||
DbColumnName=item.Name,
|
DbColumnName = item.Name,
|
||||||
PropertyName= UtilMethods.GetUnderType(item.PropertyType).Name,
|
PropertyName = UtilMethods.GetUnderType(item.PropertyType).Name,
|
||||||
PropertyType=UtilMethods.GetUnderType(item.PropertyType)
|
PropertyType = UtilMethods.GetUnderType(item.PropertyType)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
var result = ((this.Context.DbFirst) as DbFirstProvider).GetClassString(columns, ref className);
|
var result = ((this.Context.DbFirst) as DbFirstProvider).GetClassString(columns, ref className);
|
||||||
@ -1181,6 +1189,11 @@ namespace SqlSugar
|
|||||||
Where<T>(whereString, whereObj);
|
Where<T>(whereString, whereObj);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public new ISugarQueryable<T, T2> Where(List<ConditionalModel> conditionalModels)
|
||||||
|
{
|
||||||
|
base.Where(conditionalModels);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public new ISugarQueryable<T, T2> WhereIF(bool isWhere, string whereString, object whereObj)
|
public new ISugarQueryable<T, T2> WhereIF(bool isWhere, string whereString, object whereObj)
|
||||||
{
|
{
|
||||||
@ -1437,6 +1450,11 @@ namespace SqlSugar
|
|||||||
_Where(expression);
|
_Where(expression);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public new ISugarQueryable<T, T2,T3> Where(List<ConditionalModel> conditionalModels)
|
||||||
|
{
|
||||||
|
base.Where(conditionalModels);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public ISugarQueryable<T, T2, T3> WhereIF(bool isWhere, Expression<Func<T, T2, T3, bool>> expression)
|
public ISugarQueryable<T, T2, T3> WhereIF(bool isWhere, Expression<Func<T, T2, T3, bool>> expression)
|
||||||
{
|
{
|
||||||
@ -1614,6 +1632,11 @@ namespace SqlSugar
|
|||||||
_Where(expression);
|
_Where(expression);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public new ISugarQueryable<T, T2,T3,T4> Where(List<ConditionalModel> conditionalModels)
|
||||||
|
{
|
||||||
|
base.Where(conditionalModels);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public new ISugarQueryable<T, T2, T3, T4> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
public new ISugarQueryable<T, T2, T3, T4> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
||||||
{
|
{
|
||||||
@ -1864,6 +1887,11 @@ namespace SqlSugar
|
|||||||
_Where(expression);
|
_Where(expression);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public new ISugarQueryable<T, T2, T3, T4,T5> Where(List<ConditionalModel> conditionalModels)
|
||||||
|
{
|
||||||
|
base.Where(conditionalModels);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public new ISugarQueryable<T, T2, T3, T4, T5> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
public new ISugarQueryable<T, T2, T3, T4, T5> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
||||||
{
|
{
|
||||||
@ -2140,6 +2168,11 @@ namespace SqlSugar
|
|||||||
_Where(expression);
|
_Where(expression);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public new ISugarQueryable<T, T2, T3, T4, T5,T6> Where(List<ConditionalModel> conditionalModels)
|
||||||
|
{
|
||||||
|
base.Where(conditionalModels);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public new ISugarQueryable<T, T2, T3, T4, T5, T6> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
public new ISugarQueryable<T, T2, T3, T4, T5, T6> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
||||||
{
|
{
|
||||||
@ -2442,6 +2475,11 @@ namespace SqlSugar
|
|||||||
_Where(expression);
|
_Where(expression);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public new ISugarQueryable<T, T2, T3, T4, T5, T6,T7> Where(List<ConditionalModel> conditionalModels)
|
||||||
|
{
|
||||||
|
base.Where(conditionalModels);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
||||||
{
|
{
|
||||||
@ -2771,6 +2809,11 @@ namespace SqlSugar
|
|||||||
_Where(expression);
|
_Where(expression);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7,T8> Where(List<ConditionalModel> conditionalModels)
|
||||||
|
{
|
||||||
|
base.Where(conditionalModels);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
||||||
{
|
{
|
||||||
@ -3132,6 +3175,12 @@ namespace SqlSugar
|
|||||||
_Where(expression);
|
_Where(expression);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8,T9> Where(List<ConditionalModel> conditionalModels)
|
||||||
|
{
|
||||||
|
base.Where(conditionalModels);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression)
|
public ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression)
|
||||||
{
|
{
|
||||||
@ -3504,6 +3553,12 @@ namespace SqlSugar
|
|||||||
_Where(expression);
|
_Where(expression);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9,T10> Where(List<ConditionalModel> conditionalModels)
|
||||||
|
{
|
||||||
|
base.Where(conditionalModels);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
||||||
{
|
{
|
||||||
if (isWhere)
|
if (isWhere)
|
||||||
@ -3912,6 +3967,11 @@ namespace SqlSugar
|
|||||||
_Where(expression);
|
_Where(expression);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10,T11> Where(List<ConditionalModel> conditionalModels)
|
||||||
|
{
|
||||||
|
base.Where(conditionalModels);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression)
|
public ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression)
|
||||||
{
|
{
|
||||||
@ -4333,6 +4393,12 @@ namespace SqlSugar
|
|||||||
_Where(expression);
|
_Where(expression);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,T12> Where(List<ConditionalModel> conditionalModels)
|
||||||
|
{
|
||||||
|
base.Where(conditionalModels);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
|
||||||
{
|
{
|
||||||
if (isWhere)
|
if (isWhere)
|
||||||
|
18
Src/Asp.Net/SqlSugar/Entities/ConditionalModel.cs
Normal file
18
Src/Asp.Net/SqlSugar/Entities/ConditionalModel.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace SqlSugar
|
||||||
|
{
|
||||||
|
public class ConditionalModel
|
||||||
|
{
|
||||||
|
public ConditionalModel()
|
||||||
|
{
|
||||||
|
this.ConditionalType = ConditionalType.Equal;
|
||||||
|
}
|
||||||
|
public string FieldName { get; set; }
|
||||||
|
public string FieldValue { get; set; }
|
||||||
|
public ConditionalType ConditionalType { get; set; }
|
||||||
|
}
|
||||||
|
}
|
17
Src/Asp.Net/SqlSugar/Enum/ConditionalType.cs
Normal file
17
Src/Asp.Net/SqlSugar/Enum/ConditionalType.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace SqlSugar
|
||||||
|
{
|
||||||
|
public enum ConditionalType
|
||||||
|
{
|
||||||
|
Equal=0,
|
||||||
|
Like=1,
|
||||||
|
GreaterThan =2,
|
||||||
|
GreaterThanOrEqual = 3,
|
||||||
|
LessThan=4,
|
||||||
|
LessThanOrEqual = 5
|
||||||
|
}
|
||||||
|
}
|
@ -200,7 +200,7 @@ namespace SqlSugar
|
|||||||
return Context.CurrentConnectionConfig.ConfigureExternalServices.SerializeService.SerializeObject(value);
|
return Context.CurrentConnectionConfig.ConfigureExternalServices.SerializeService.SerializeObject(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Serialize Object
|
/// Serialize Object
|
||||||
@ -230,13 +230,14 @@ namespace SqlSugar
|
|||||||
return DeserializeObject<T>(jsonString);
|
return DeserializeObject<T>(jsonString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public SqlSugarClient CopyContext(bool isCopyEvents=false)
|
public SqlSugarClient CopyContext(bool isCopyEvents = false)
|
||||||
{
|
{
|
||||||
var newClient = new SqlSugarClient(this.TranslateCopy(Context.CurrentConnectionConfig));
|
var newClient = new SqlSugarClient(this.TranslateCopy(Context.CurrentConnectionConfig));
|
||||||
newClient.MappingColumns = this.TranslateCopy(Context.MappingColumns);
|
newClient.MappingColumns = this.TranslateCopy(Context.MappingColumns);
|
||||||
newClient.MappingTables = this.TranslateCopy(Context.MappingTables);
|
newClient.MappingTables = this.TranslateCopy(Context.MappingTables);
|
||||||
newClient.IgnoreColumns = this.TranslateCopy(Context.IgnoreColumns);
|
newClient.IgnoreColumns = this.TranslateCopy(Context.IgnoreColumns);
|
||||||
if (isCopyEvents) {
|
if (isCopyEvents)
|
||||||
|
{
|
||||||
newClient.Ado.IsEnableLogEvent = Context.Ado.IsEnableLogEvent;
|
newClient.Ado.IsEnableLogEvent = Context.Ado.IsEnableLogEvent;
|
||||||
newClient.Ado.LogEventStarting = Context.Ado.LogEventStarting;
|
newClient.Ado.LogEventStarting = Context.Ado.LogEventStarting;
|
||||||
newClient.Ado.LogEventCompleted = Context.Ado.LogEventCompleted;
|
newClient.Ado.LogEventCompleted = Context.Ado.LogEventCompleted;
|
||||||
@ -290,6 +291,51 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Query
|
||||||
|
public KeyValuePair<string, SugarParameter[]> ConditionalModelToSql(List<ConditionalModel> models)
|
||||||
|
{
|
||||||
|
if (models.IsNullOrEmpty()) return new KeyValuePair<string, SugarParameter[]>();
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
List<SugarParameter> parameters = new List<SugarParameter>() ;
|
||||||
|
var sqlBuilder = InstanceFactory.GetSqlbuilder(this.Context.CurrentConnectionConfig);
|
||||||
|
foreach (var item in models)
|
||||||
|
{
|
||||||
|
var index = models.IndexOf(item);
|
||||||
|
var type = index == 0?"":"AND";
|
||||||
|
string temp = " {0} {1} {2} {3} ";
|
||||||
|
string parameterName = string.Format("{0}Conditional{1}{2}",sqlBuilder.SqlParameterKeyWord,item.FieldName,index);
|
||||||
|
switch (item.ConditionalType)
|
||||||
|
{
|
||||||
|
case ConditionalType.Equal:
|
||||||
|
builder.AppendFormat(temp,type,item.FieldName,"=", parameterName);
|
||||||
|
parameters.Add(new SugarParameter(parameterName,item.FieldValue));
|
||||||
|
break;
|
||||||
|
case ConditionalType.Like:
|
||||||
|
builder.AppendFormat(temp, type, item.FieldName, "LIKE", parameterName);
|
||||||
|
parameters.Add(new SugarParameter(parameterName, "%"+item.FieldValue+"%"));
|
||||||
|
break;
|
||||||
|
case ConditionalType.GreaterThan:
|
||||||
|
builder.AppendFormat(temp, type, item.FieldName, ">", parameterName);
|
||||||
|
parameters.Add(new SugarParameter(parameterName, item.FieldValue));
|
||||||
|
break;
|
||||||
|
case ConditionalType.GreaterThanOrEqual:
|
||||||
|
builder.AppendFormat(temp, type, item.FieldName, ">=", parameterName);
|
||||||
|
parameters.Add(new SugarParameter(parameterName, item.FieldValue));
|
||||||
|
break;
|
||||||
|
case ConditionalType.LessThan:
|
||||||
|
builder.AppendFormat(temp, type, item.FieldName, "<", parameterName);
|
||||||
|
parameters.Add(new SugarParameter(parameterName, item.FieldValue));
|
||||||
|
break;
|
||||||
|
case ConditionalType.LessThanOrEqual:
|
||||||
|
builder.AppendFormat(temp, type, item.FieldName, "<=", parameterName);
|
||||||
|
parameters.Add(new SugarParameter(parameterName, item.FieldValue));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new KeyValuePair<string, SugarParameter[]>(builder.ToString(), parameters.ToArray());
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ namespace SqlSugar
|
|||||||
void RemoveCacheAll();
|
void RemoveCacheAll();
|
||||||
void RemoveCacheAll<T>();
|
void RemoveCacheAll<T>();
|
||||||
void RemoveCache<T>(string key);
|
void RemoveCache<T>(string key);
|
||||||
|
KeyValuePair<string, SugarParameter[]> ConditionalModelToSql(List<ConditionalModel> models);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@ namespace SqlSugar
|
|||||||
|
|
||||||
ISugarQueryable<T> Where(Expression<Func<T, bool>> expression);
|
ISugarQueryable<T> Where(Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T> Where(string whereString, object whereObj = null);
|
ISugarQueryable<T> Where(string whereString, object whereObj = null);
|
||||||
|
ISugarQueryable<T> Where(List<ConditionalModel> conditionalModels);
|
||||||
|
|
||||||
ISugarQueryable<T> Having(Expression<Func<T, bool>> expression);
|
ISugarQueryable<T> Having(Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T> Having(string whereString, object whereObj = null);
|
ISugarQueryable<T> Having(string whereString, object whereObj = null);
|
||||||
@ -131,6 +132,7 @@ namespace SqlSugar
|
|||||||
#region Where
|
#region Where
|
||||||
new ISugarQueryable<T, T2> Where(Expression<Func<T, bool>> expression);
|
new ISugarQueryable<T, T2> Where(Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T, T2> Where(Expression<Func<T, T2, bool>> expression);
|
ISugarQueryable<T, T2> Where(Expression<Func<T, T2, bool>> expression);
|
||||||
|
new ISugarQueryable<T,T2> Where(List<ConditionalModel> conditionalModels);
|
||||||
|
|
||||||
new ISugarQueryable<T, T2> WhereIF(bool isWhere,Expression<Func<T, bool>> expression);
|
new ISugarQueryable<T, T2> WhereIF(bool isWhere,Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T, T2> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
ISugarQueryable<T, T2> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
||||||
@ -189,6 +191,7 @@ namespace SqlSugar
|
|||||||
new ISugarQueryable<T, T2, T3> Where(Expression<Func<T, bool>> expression);
|
new ISugarQueryable<T, T2, T3> Where(Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3> Where(Expression<Func<T, T2, bool>> expression);
|
ISugarQueryable<T, T2, T3> Where(Expression<Func<T, T2, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3> Where(Expression<Func<T, T2, T3, bool>> expression);
|
ISugarQueryable<T, T2, T3> Where(Expression<Func<T, T2, T3, bool>> expression);
|
||||||
|
new ISugarQueryable<T, T2,T3> Where(List<ConditionalModel> conditionalModels);
|
||||||
|
|
||||||
new ISugarQueryable<T, T2, T3> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
new ISugarQueryable<T, T2, T3> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
ISugarQueryable<T, T2, T3> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
||||||
@ -248,6 +251,7 @@ namespace SqlSugar
|
|||||||
ISugarQueryable<T, T2, T3, T4> Where(Expression<Func<T, T2, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4> Where(Expression<Func<T, T2, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4> Where(Expression<Func<T, T2, T3, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4> Where(Expression<Func<T, T2, T3, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4> Where(Expression<Func<T, T2, T3, T4, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4> Where(Expression<Func<T, T2, T3, T4, bool>> expression);
|
||||||
|
new ISugarQueryable<T, T2, T3,T4> Where(List<ConditionalModel> conditionalModels);
|
||||||
|
|
||||||
new ISugarQueryable<T, T2, T3, T4> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
new ISugarQueryable<T, T2, T3, T4> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
||||||
@ -312,6 +316,7 @@ namespace SqlSugar
|
|||||||
ISugarQueryable<T, T2, T3, T4, T5> Where(Expression<Func<T, T2, T3, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5> Where(Expression<Func<T, T2, T3, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5> Where(Expression<Func<T, T2, T3, T4, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5> Where(Expression<Func<T, T2, T3, T4, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5> Where(Expression<Func<T, T2, T3, T4, T5, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5> Where(Expression<Func<T, T2, T3, T4, T5, bool>> expression);
|
||||||
|
new ISugarQueryable<T, T2, T3, T4,T5> Where(List<ConditionalModel> conditionalModels);
|
||||||
|
|
||||||
|
|
||||||
new ISugarQueryable<T, T2, T3, T4, T5> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
new ISugarQueryable<T, T2, T3, T4, T5> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
||||||
@ -382,6 +387,7 @@ namespace SqlSugar
|
|||||||
ISugarQueryable<T, T2, T3, T4, T5, T6> Where(Expression<Func<T, T2, T3, T4, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6> Where(Expression<Func<T, T2, T3, T4, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6> Where(Expression<Func<T, T2, T3, T4, T5, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6> Where(Expression<Func<T, T2, T3, T4, T5, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6> Where(Expression<Func<T, T2, T3, T4, T5, T6, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6> Where(Expression<Func<T, T2, T3, T4, T5, T6, bool>> expression);
|
||||||
|
new ISugarQueryable<T, T2, T3, T4, T5,T6> Where(List<ConditionalModel> conditionalModels);
|
||||||
|
|
||||||
new ISugarQueryable<T, T2, T3, T4, T5, T6> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
new ISugarQueryable<T, T2, T3, T4, T5, T6> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
||||||
@ -456,6 +462,7 @@ namespace SqlSugar
|
|||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7> Where(Expression<Func<T, T2, T3, T4, T5, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7> Where(Expression<Func<T, T2, T3, T4, T5, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7> Where(Expression<Func<T, T2, T3, T4, T5, T6, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7> Where(Expression<Func<T, T2, T3, T4, T5, T6, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, bool>> expression);
|
||||||
|
new ISugarQueryable<T, T2, T3, T4, T5, T6,T7> Where(List<ConditionalModel> conditionalModels);
|
||||||
|
|
||||||
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
||||||
@ -535,6 +542,7 @@ namespace SqlSugar
|
|||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> Where(Expression<Func<T, T2, T3, T4, T5, T6, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> Where(Expression<Func<T, T2, T3, T4, T5, T6, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, bool>> expression);
|
||||||
|
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7,T8> Where(List<ConditionalModel> conditionalModels);
|
||||||
|
|
||||||
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
||||||
@ -621,6 +629,7 @@ namespace SqlSugar
|
|||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8,T9> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8,T9> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8,T9> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8,T9> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8,T9, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8,T9, bool>> expression);
|
||||||
|
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8,T9> Where(List<ConditionalModel> conditionalModels);
|
||||||
|
|
||||||
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8,T9> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8,T9> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8,T9> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8,T9> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
||||||
@ -710,6 +719,7 @@ namespace SqlSugar
|
|||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9,T10> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9,T10> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9,T10> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9,T10> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9,T10, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9,T10, bool>> expression);
|
||||||
|
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9,T10> Where(List<ConditionalModel> conditionalModels);
|
||||||
|
|
||||||
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9,T10> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9,T10> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9,T10> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9,T10> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
||||||
@ -804,6 +814,7 @@ namespace SqlSugar
|
|||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10,T11> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10,T11> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10,T11> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10,T11> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10,T11, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10,T11, bool>> expression);
|
||||||
|
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10,T11> Where(List<ConditionalModel> conditionalModels);
|
||||||
|
|
||||||
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10,T11> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10,T11> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10,T11> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10,T11> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
||||||
@ -903,6 +914,7 @@ namespace SqlSugar
|
|||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,T12> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,T12> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,T12> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,T12> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,T12, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Where(Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,T12, bool>> expression);
|
||||||
|
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,T12> Where(List<ConditionalModel> conditionalModels);
|
||||||
|
|
||||||
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,T12> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,T12> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
|
||||||
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,T12> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,T12> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
|
||||||
|
@ -76,6 +76,8 @@
|
|||||||
<Compile Include="CacheScheme\CacheKeyBuider.cs" />
|
<Compile Include="CacheScheme\CacheKeyBuider.cs" />
|
||||||
<Compile Include="CacheScheme\CacheSchemeMain.cs" />
|
<Compile Include="CacheScheme\CacheSchemeMain.cs" />
|
||||||
<Compile Include="Entities\CacheKey.cs" />
|
<Compile Include="Entities\CacheKey.cs" />
|
||||||
|
<Compile Include="Entities\ConditionalModel.cs" />
|
||||||
|
<Compile Include="Enum\ConditionalType.cs" />
|
||||||
<Compile Include="Enum\DbType.cs" />
|
<Compile Include="Enum\DbType.cs" />
|
||||||
<Compile Include="ExpressionsToSql\Subquery\Items\ISubOperation.cs" />
|
<Compile Include="ExpressionsToSql\Subquery\Items\ISubOperation.cs" />
|
||||||
<Compile Include="ExpressionsToSql\Subquery\Items\SubAnd.cs" />
|
<Compile Include="ExpressionsToSql\Subquery\Items\SubAnd.cs" />
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user