Browse Source

Add Queryable.OrderByDescending

pull/19/head
sunkaixuan 3 years ago
parent
commit
04089d57b4
  1. 51
      Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs
  2. 10
      Src/Asp.Net/SqlSugar/Interface/IQueryable.cs

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

@ -755,6 +755,11 @@ namespace SqlSugar
this._OrderBy(expression, type);
return this;
}
public virtual ISugarQueryable<T> OrderByDescending(Expression<Func<T, object>> expression)
{
this._OrderBy(expression, OrderByType.Desc);
return this;
}
public virtual ISugarQueryable<T> GroupBy(Expression<Func<T, object>> expression)
{
_GroupBy(expression);
@ -3503,7 +3508,16 @@ namespace SqlSugar
_OrderBy(expression, type);
return this;
}
public new virtual ISugarQueryable<T,T2> OrderByDescending(Expression<Func<T, object>> expression)
{
this._OrderBy(expression, OrderByType.Desc);
return this;
}
public virtual ISugarQueryable<T, T2> OrderByDescending(Expression<Func<T,T2, object>> expression)
{
this._OrderBy(expression, OrderByType.Desc);
return this;
}
public new ISugarQueryable<T, T2> OrderBy(Expression<Func<T, object>> expression, OrderByType type)
{
_OrderBy(expression, type);
@ -3906,6 +3920,21 @@ namespace SqlSugar
#endregion
#region Order
public new virtual ISugarQueryable<T, T2,T3> OrderByDescending(Expression<Func<T, object>> expression)
{
this._OrderBy(expression, OrderByType.Desc);
return this;
}
public virtual ISugarQueryable<T, T2,T3> OrderByDescending(Expression<Func<T, T2, object>> expression)
{
this._OrderBy(expression, OrderByType.Desc);
return this;
}
public virtual ISugarQueryable<T, T2,T3> OrderByDescending(Expression<Func<T, T2,T3, object>> expression)
{
this._OrderBy(expression, OrderByType.Desc);
return this;
}
public new ISugarQueryable<T, T2,T3> OrderBy(string orderFileds)
{
base.OrderBy(orderFileds);
@ -4445,6 +4474,26 @@ namespace SqlSugar
#endregion
#region OrderBy
public new virtual ISugarQueryable<T, T2, T3, T4> OrderByDescending(Expression<Func<T, object>> expression)
{
this._OrderBy(expression, OrderByType.Desc);
return this;
}
public virtual ISugarQueryable<T, T2, T3, T4> OrderByDescending(Expression<Func<T, T2, object>> expression)
{
this._OrderBy(expression, OrderByType.Desc);
return this;
}
public virtual ISugarQueryable<T, T2, T3, T4> OrderByDescending(Expression<Func<T, T2, T3, object>> expression)
{
this._OrderBy(expression, OrderByType.Desc);
return this;
}
public virtual ISugarQueryable<T, T2, T3,T4> OrderByDescending(Expression<Func<T, T2, T3, T4, object>> expression)
{
this._OrderBy(expression, OrderByType.Desc);
return this;
}
public new ISugarQueryable<T, T2,T3,T4> OrderBy(string orderFileds)
{
base.OrderBy(orderFileds);

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

@ -76,6 +76,7 @@ namespace SqlSugar
ISugarQueryable<T> OrderBy(string orderFileds);
ISugarQueryable<T> OrderBy(Expression<Func<T, object>> expression, OrderByType type = OrderByType.Asc);
ISugarQueryable<T> OrderByDescending(Expression<Func<T, object>> expression);
ISugarQueryable<T> OrderByIF(bool isOrderBy, string orderFileds);
ISugarQueryable<T> OrderByIF(bool isOrderBy, Expression<Func<T, object>> expression, OrderByType type = OrderByType.Asc);
@ -234,6 +235,8 @@ namespace SqlSugar
#endregion
#region OrderBy
new ISugarQueryable<T,T2> OrderByDescending(Expression<Func<T, object>> expression);
ISugarQueryable<T, T2> OrderByDescending(Expression<Func<T,T2, object>> expression);
new ISugarQueryable<T, T2> OrderBy(string orderFileds);
new ISugarQueryable<T, T2> OrderBy(Expression<Func<T, object>> expression, OrderByType type = OrderByType.Asc);
ISugarQueryable<T, T2> OrderBy(Expression<Func<T, T2, object>> expression, OrderByType type = OrderByType.Asc);
@ -331,6 +334,9 @@ namespace SqlSugar
#endregion
#region OrderBy
new ISugarQueryable<T, T2,T3> OrderByDescending(Expression<Func<T, object>> expression);
ISugarQueryable<T, T2,T3> OrderByDescending(Expression<Func<T, T2, object>> expression);
ISugarQueryable<T, T2, T3> OrderByDescending(Expression<Func<T, T2,T3, object>> expression);
new ISugarQueryable<T, T2,T3> OrderBy(string orderFileds);
new ISugarQueryable<T, T2, T3> OrderBy(Expression<Func<T, object>> expression, OrderByType type = OrderByType.Asc);
ISugarQueryable<T, T2, T3> OrderBy(Expression<Func<T, T2, object>> expression, OrderByType type = OrderByType.Asc);
@ -441,6 +447,10 @@ namespace SqlSugar
#endregion
#region OrderBy
new ISugarQueryable<T, T2, T3,T4> OrderByDescending(Expression<Func<T, object>> expression);
ISugarQueryable<T, T2, T3, T4> OrderByDescending(Expression<Func<T, T2, object>> expression);
ISugarQueryable<T, T2, T3, T4> OrderByDescending(Expression<Func<T, T2, T3, object>> expression);
ISugarQueryable<T, T2, T3, T4> OrderByDescending(Expression<Func<T, T2, T3,T4, object>> expression);
new ISugarQueryable<T, T2, T3,T4> OrderBy(string orderFileds);
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);

Loading…
Cancel
Save