Browse Source

Add Where<T,T2..>(String) override

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
099f966796
  1. 100
      Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs
  2. 23
      Src/Asp.Net/SqlSugar/Interface/IQueryable.cs

100
Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs

@ -665,7 +665,7 @@ namespace SqlSugar
_Where(expression);
return this;
}
public ISugarQueryable<T, T2> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
public new ISugarQueryable<T, T2> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
{
if (isWhere)
_Where(expression);
@ -677,6 +677,18 @@ namespace SqlSugar
_Where(expression);
return this;
}
public new ISugarQueryable<T, T2> Where(string whereString, object whereObj)
{
Where<T>(whereString, whereObj);
return this;
}
public new ISugarQueryable<T, T2> WhereIF(bool isWhere, string whereString, object whereObj)
{
if (!isWhere) return this;
this.Where<T>(whereString, whereObj);
return this;
}
#endregion
#region Select
@ -802,12 +814,25 @@ namespace SqlSugar
return this;
}
public ISugarQueryable<T, T2, T3> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
public new ISugarQueryable<T, T2, T3> WhereIF(bool isWhere, Expression<Func<T, bool>> expression)
{
if (isWhere)
_Where(expression);
return this;
}
public new ISugarQueryable<T, T2,T3> Where(string whereString, object whereObj)
{
Where<T>(whereString, whereObj);
return this;
}
public new ISugarQueryable<T, T2,T3> WhereIF(bool isWhere, string whereString, object whereObj)
{
if (!isWhere) return this;
this.Where<T>(whereString, whereObj);
return this;
}
#endregion
}
@ -837,7 +862,7 @@ namespace SqlSugar
return this;
}
public 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)
{
if (isWhere)
_Where(expression);
@ -864,6 +889,19 @@ namespace SqlSugar
_Where(expression);
return this;
}
public new ISugarQueryable<T, T2, T3,T4> Where(string whereString, object whereObj)
{
Where<T>(whereString, whereObj);
return this;
}
public new ISugarQueryable<T, T2, T3,T4> WhereIF(bool isWhere, string whereString, object whereObj)
{
if (!isWhere) return this;
this.Where<T>(whereString, whereObj);
return this;
}
#endregion
#region Select
@ -958,7 +996,7 @@ namespace SqlSugar
return this;
}
public 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)
{
if (isWhere)
_Where(expression);
@ -992,6 +1030,19 @@ namespace SqlSugar
_Where(expression);
return this;
}
public new ISugarQueryable<T, T2, T3, T4,T5> Where(string whereString, object whereObj)
{
Where<T>(whereString, whereObj);
return this;
}
public new ISugarQueryable<T, T2, T3, T4,T5> WhereIF(bool isWhere, string whereString, object whereObj)
{
if (!isWhere) return this;
this.Where<T>(whereString, whereObj);
return this;
}
#endregion
#region Select
@ -1105,7 +1156,7 @@ namespace SqlSugar
return this;
}
public 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)
{
if (isWhere)
_Where(expression);
@ -1146,6 +1197,19 @@ namespace SqlSugar
_Where(expression);
return this;
}
public new ISugarQueryable<T, T2, T3, T4, T5,T6> Where(string whereString, object whereObj)
{
Where<T>(whereString, whereObj);
return this;
}
public new ISugarQueryable<T, T2, T3, T4, T5,T6> WhereIF(bool isWhere, string whereString, object whereObj)
{
if (!isWhere) return this;
this.Where<T>(whereString, whereObj);
return this;
}
#endregion
#region Select
@ -1326,6 +1390,19 @@ namespace SqlSugar
_Where(expression);
return this;
}
public new ISugarQueryable<T, T2, T3, T4, T5, T6,T7> Where(string whereString, object whereObj)
{
Where<T>(whereString, whereObj);
return this;
}
public new ISugarQueryable<T, T2, T3, T4, T5, T6,T7> WhereIF(bool isWhere, string whereString, object whereObj)
{
if (!isWhere) return this;
this.Where<T>(whereString, whereObj);
return this;
}
#endregion
#region Select
@ -1533,6 +1610,19 @@ namespace SqlSugar
_Where(expression);
return this;
}
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7,T8> Where(string whereString, object whereObj)
{
Where<T>(whereString, whereObj);
return this;
}
public new ISugarQueryable<T, T2, T3, T4, T5, T6, T7,T8> WhereIF(bool isWhere, string whereString, object whereObj)
{
if (!isWhere) return this;
this.Where<T>(whereString, whereObj);
return this;
}
#endregion
#region Select

23
Src/Asp.Net/SqlSugar/Interface/IQueryable.cs

@ -99,6 +99,9 @@ namespace SqlSugar
new ISugarQueryable<T, T2> WhereIF(bool isWhere,Expression<Func<T, bool>> expression);
ISugarQueryable<T, T2> WhereIF(bool isWhere, Expression<Func<T, T2, bool>> expression);
new ISugarQueryable<T,T2> Where(string whereString, object whereObj = null);
new ISugarQueryable<T,T2> WhereIF(bool isWhere, string whereString, object whereObj = null);
#endregion
#region Select
@ -125,6 +128,9 @@ namespace SqlSugar
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, T3, bool>> expression);
new ISugarQueryable<T, T2,T3> Where(string whereString, object whereObj = null);
new ISugarQueryable<T, T2,T3> WhereIF(bool isWhere, string whereString, object whereObj = null);
#endregion
#region Select
@ -156,6 +162,9 @@ namespace SqlSugar
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, T3, bool>> expression);
ISugarQueryable<T, T2, T3, T4> WhereIF(bool isWhere, Expression<Func<T, T2, T3, T4, bool>> expression);
new ISugarQueryable<T, T2,T3,T4> Where(string whereString, object whereObj = null);
new ISugarQueryable<T, T2, T3, T4> WhereIF(bool isWhere, string whereString, object whereObj = null);
#endregion
#region Select
@ -193,6 +202,9 @@ namespace SqlSugar
ISugarQueryable<T, T2, T3, T4, T5> WhereIF(bool isWhere, Expression<Func<T, T2, T3, bool>> expression);
ISugarQueryable<T, T2, T3, T4, T5> WhereIF(bool isWhere, Expression<Func<T, T2, T3, T4, bool>> expression);
ISugarQueryable<T, T2, T3, T4, T5> WhereIF(bool isWhere, Expression<Func<T, T2, T3, T4, T5, bool>> expression);
new ISugarQueryable<T, T2, T3, T4,T5> Where(string whereString, object whereObj = null);
new ISugarQueryable<T, T2, T3, T4,T5> WhereIF(bool isWhere, string whereString, object whereObj = null);
#endregion
#region Select
@ -234,6 +246,9 @@ namespace SqlSugar
ISugarQueryable<T, T2, T3, T4, T5, T6> WhereIF(bool isWhere, Expression<Func<T, T2, T3, T4, bool>> expression);
ISugarQueryable<T, T2, T3, T4, T5, T6> WhereIF(bool isWhere, Expression<Func<T, T2, T3, T4, T5, bool>> expression);
ISugarQueryable<T, T2, T3, T4, T5, T6> WhereIF(bool isWhere, Expression<Func<T, T2, T3, T4, T5, T6, bool>> expression);
new ISugarQueryable<T, T2, T3, T4, T5 ,T6> Where(string whereString, object whereObj = null);
new ISugarQueryable<T, T2, T3, T4, T5,T6> WhereIF(bool isWhere, string whereString, object whereObj = null);
#endregion
#region Select
@ -273,13 +288,16 @@ namespace SqlSugar
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> 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, T3, bool>> expression);
ISugarQueryable<T, T2, T3, T4, T5, T6, T7> WhereIF(bool isWhere, Expression<Func<T, T2, T3, T4, bool>> expression);
ISugarQueryable<T, T2, T3, T4, T5, T6, T7> WhereIF(bool isWhere, Expression<Func<T, T2, T3, T4, T5, bool>> expression);
ISugarQueryable<T, T2, T3, T4, T5, T6, T7> WhereIF(bool isWhere, Expression<Func<T, T2, T3, T4, T5, T6, bool>> expression);
ISugarQueryable<T, T2, T3, T4, T5, T6, T7> WhereIF(bool isWhere, Expression<Func<T, T2, T3, T4, T5, T6, T7, bool>> expression);
new ISugarQueryable<T, T2, T3, T4, T5, T6,T7> Where(string whereString, object whereObj = null);
new ISugarQueryable<T, T2, T3, T4, T5, T6,T7> WhereIF(bool isWhere, string whereString, object whereObj = null);
#endregion
#region Select
@ -331,6 +349,9 @@ namespace SqlSugar
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> WhereIF(bool isWhere, Expression<Func<T, T2, T3, T4, T5, T6, bool>> expression);
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> WhereIF(bool isWhere, Expression<Func<T, T2, T3, T4, T5, T6, T7, bool>> expression);
ISugarQueryable<T, T2, T3, T4, T5, T6, T7, T8> WhereIF(bool isWhere, Expression<Func<T, T2, T3, T4, T5, T6, T7, T8, bool>> expression);
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7,T8> Where(string whereString, object whereObj = null);
new ISugarQueryable<T, T2, T3, T4, T5, T6, T7,T8> WhereIF(bool isWhere, string whereString, object whereObj = null);
#endregion
#region Select

Loading…
Cancel
Save