Browse Source

-

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
4281b34c04
  1. 81
      SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs
  2. 25
      SqlSugar/Interface/IQueryable.cs

81
SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs

@ -12,7 +12,88 @@ namespace SqlSugar
{
public partial class QueryableProvider<T, T2, T3, T4> : QueryableProvider<T>, ISugarQueryable<T, T2, T3, T4>
{
#region Where
public new ISugarQueryable<T, T2, T3, T4> Where(Expression<Func<T, bool>> expression)
{
_Where(expression);
return this;
}
public ISugarQueryable<T, T2, T3, T4> Where(Expression<Func<T, T2, bool>> expression)
{
_Where(expression);
return this;
}
public ISugarQueryable<T, T2, T3, T4> Where(Expression<Func<T, T2, T3, bool>> expression)
{
_Where(expression);
return this;
}
public ISugarQueryable<T, T2, T3, T4> Where(Expression<Func<T, T2, T3, T4, bool>> expression)
{
_Where(expression);
return this;
}
#endregion
#region Select
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, TResult>> expression)
{
return _Select<TResult>(expression);
}
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, TResult>> expression)
{
return _Select<TResult>(expression);
}
public ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, T4, TResult>> expression)
{
return _Select<TResult>(expression);
}
#endregion
#region OrderBy
public new ISugarQueryable<T, T2, T3, T4> OrderBy(Expression<Func<T, object>> expression, OrderByType type = OrderByType.Asc) {
_OrderBy(expression);
return this;
}
public ISugarQueryable<T, T2, T3, T4> OrderBy(Expression<Func<T, T2, object>> expression, OrderByType type = OrderByType.Asc)
{
_OrderBy(expression);
return this;
}
public ISugarQueryable<T, T2, T3, T4> OrderBy(Expression<Func<T, T2, T3, object>> expression, OrderByType type = OrderByType.Asc)
{
_OrderBy(expression);
return this;
}
public ISugarQueryable<T, T2, T3, T4> OrderBy(Expression<Func<T, T2, T3, T4, object>> expression, OrderByType type = OrderByType.Asc)
{
_OrderBy(expression);
return this;
}
#endregion
#region GroupBy
public new ISugarQueryable<T, T2, T3, T4> GroupBy(Expression<Func<T, object>> expression)
{
_GroupBy(expression);
return this;
}
public ISugarQueryable<T, T2, T3, T4> GroupBy(Expression<Func<T, T2, object>> expression)
{
_GroupBy(expression);
return this;
}
public ISugarQueryable<T, T2, T3, T4> GroupBy(Expression<Func<T, T2, T3, object>> expression)
{
_GroupBy(expression);
return this;
}
public ISugarQueryable<T, T2, T3, T4> GroupBy(Expression<Func<T, T2, T3, T4, object>> expression)
{
_GroupBy(expression);
return this;
}
#endregion
}
public partial class QueryableProvider<T, T2, T3> : QueryableProvider<T>, ISugarQueryable<T, T2, T3>
{

25
SqlSugar/Interface/IQueryable.cs

@ -155,7 +155,32 @@ namespace SqlSugar
}
public partial interface ISugarQueryable<T, T2, T3, T4> : ISugarQueryable<T>
{
#region Where
new ISugarQueryable<T, T2, T3, T4> Where(Expression<Func<T, 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,T4, bool>> expression);
#endregion
#region Select
ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, TResult>> expression);
ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3, TResult>> expression);
ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, T2, T3,T4, TResult>> expression);
#endregion
#region OrderBy
new ISugarQueryable<T, T2, T3, T4> OrderBy(Expression<Func<T, object>> expression, OrderByType type = OrderByType.Asc);
ISugarQueryable<T, T2, T3, T4> OrderBy(Expression<Func<T, T2, object>> expression, OrderByType type = OrderByType.Asc);
ISugarQueryable<T, T2, T3, T4> OrderBy(Expression<Func<T, T2, T3, object>> expression, OrderByType type = OrderByType.Asc);
ISugarQueryable<T, T2, T3, T4> OrderBy(Expression<Func<T, T2, T3,T4, object>> expression, OrderByType type = OrderByType.Asc);
#endregion
#region GroupBy
new ISugarQueryable<T, T2, T3, T4> GroupBy(Expression<Func<T, object>> expression);
ISugarQueryable<T, T2, T3, T4> GroupBy(Expression<Func<T, T2, object>> expression);
ISugarQueryable<T, T2, T3, T4> GroupBy(Expression<Func<T, T2, T3, object>> expression);
ISugarQueryable<T, T2, T3, T4> GroupBy(Expression<Func<T, T2, T3,T4, object>> expression);
#endregion
}
//public partial interface ISugarQueryable<T, T2, T3, T4,T5> : ISugarQueryable<T>
//{

Loading…
Cancel
Save