From df11dfd2919e375a63c95e6f1e2dfb4e130704ce Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Thu, 19 May 2022 13:10:32 +0800 Subject: [PATCH] Update OrderByDescending --- .../QueryableProvider/QueryableProvider.cs | 56 +++++++++++++++++++ Src/Asp.Net/SqlSugar/Interface/IQueryable.cs | 11 ++++ 2 files changed, 67 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs index 43d153917..812315723 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs @@ -5056,6 +5056,31 @@ namespace SqlSugar #endregion #region OrderBy + public new virtual ISugarQueryable OrderByDescending(Expression> expression) + { + this._OrderBy(expression, OrderByType.Desc); + return this; + } + public virtual ISugarQueryable OrderByDescending(Expression> expression) + { + this._OrderBy(expression, OrderByType.Desc); + return this; + } + public virtual ISugarQueryable OrderByDescending(Expression> expression) + { + this._OrderBy(expression, OrderByType.Desc); + return this; + } + public virtual ISugarQueryable OrderByDescending(Expression> expression) + { + this._OrderBy(expression, OrderByType.Desc); + return this; + } + public virtual ISugarQueryable OrderByDescending(Expression> expression) + { + this._OrderBy(expression, OrderByType.Desc); + return this; + } public new ISugarQueryable OrderBy(string orderFileds) { base.OrderBy(orderFileds); @@ -5581,6 +5606,37 @@ namespace SqlSugar #endregion #region OrderBy + public new virtual ISugarQueryable OrderByDescending(Expression> expression) + { + this._OrderBy(expression, OrderByType.Desc); + return this; + } + public virtual ISugarQueryable OrderByDescending(Expression> expression) + { + this._OrderBy(expression, OrderByType.Desc); + return this; + } + public virtual ISugarQueryable OrderByDescending(Expression> expression) + { + this._OrderBy(expression, OrderByType.Desc); + return this; + } + public virtual ISugarQueryable OrderByDescending(Expression> expression) + { + this._OrderBy(expression, OrderByType.Desc); + return this; + } + public virtual ISugarQueryable OrderByDescending(Expression> expression) + { + this._OrderBy(expression, OrderByType.Desc); + return this; + } + public virtual ISugarQueryable OrderByDescending(Expression> expression) + { + this._OrderBy(expression, OrderByType.Desc); + return this; + } + public new ISugarQueryable OrderBy(string orderFileds) { base.OrderBy(orderFileds); diff --git a/Src/Asp.Net/SqlSugar/Interface/IQueryable.cs b/Src/Asp.Net/SqlSugar/Interface/IQueryable.cs index 8e51a29af..b645dc95d 100644 --- a/Src/Asp.Net/SqlSugar/Interface/IQueryable.cs +++ b/Src/Asp.Net/SqlSugar/Interface/IQueryable.cs @@ -570,6 +570,11 @@ namespace SqlSugar #endregion #region OrderBy + new ISugarQueryable OrderByDescending(Expression> expression); + ISugarQueryable OrderByDescending(Expression> expression); + ISugarQueryable OrderByDescending(Expression> expression); + ISugarQueryable OrderByDescending(Expression> expression); + ISugarQueryable OrderByDescending(Expression> expression); new ISugarQueryable OrderBy(string orderFileds); new ISugarQueryable OrderBy(Expression> expression, OrderByType type = OrderByType.Asc); ISugarQueryable OrderBy(Expression> expression, OrderByType type = OrderByType.Asc); @@ -685,6 +690,12 @@ namespace SqlSugar #endregion #region OrderBy + new ISugarQueryable OrderByDescending(Expression> expression); + ISugarQueryable OrderByDescending(Expression> expression); + ISugarQueryable OrderByDescending(Expression> expression); + ISugarQueryable OrderByDescending(Expression> expression); + ISugarQueryable OrderByDescending(Expression> expression); + ISugarQueryable OrderByDescending(Expression> expression); new ISugarQueryable OrderBy(string orderFileds); new ISugarQueryable OrderBy(Expression> expression, OrderByType type = OrderByType.Asc); ISugarQueryable OrderBy(Expression> expression, OrderByType type = OrderByType.Asc);