From 4281b34c04fd26b18d5bd3b919a6e58d8e21a563 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 26 May 2017 02:05:40 +0800 Subject: [PATCH] - --- .../QueryableProvider/QueryableProvider.cs | 81 +++++++++++++++++++ SqlSugar/Interface/IQueryable.cs | 25 ++++++ 2 files changed, 106 insertions(+) diff --git a/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs b/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs index 3edcdf32f..840cb6cd0 100644 --- a/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs +++ b/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs @@ -12,7 +12,88 @@ namespace SqlSugar { public partial class QueryableProvider : QueryableProvider, ISugarQueryable { + #region Where + public new ISugarQueryable Where(Expression> expression) + { + _Where(expression); + return this; + } + public ISugarQueryable Where(Expression> expression) + { + _Where(expression); + return this; + } + public ISugarQueryable Where(Expression> expression) + { + _Where(expression); + return this; + } + public ISugarQueryable Where(Expression> expression) + { + _Where(expression); + return this; + } + #endregion + #region Select + public ISugarQueryable Select(Expression> expression) + { + return _Select(expression); + } + public ISugarQueryable Select(Expression> expression) + { + return _Select(expression); + } + public ISugarQueryable Select(Expression> expression) + { + return _Select(expression); + } + #endregion + + #region OrderBy + public new ISugarQueryable OrderBy(Expression> expression, OrderByType type = OrderByType.Asc) { + _OrderBy(expression); + return this; + } + public ISugarQueryable OrderBy(Expression> expression, OrderByType type = OrderByType.Asc) + { + _OrderBy(expression); + return this; + } + public ISugarQueryable OrderBy(Expression> expression, OrderByType type = OrderByType.Asc) + { + _OrderBy(expression); + return this; + } + public ISugarQueryable OrderBy(Expression> expression, OrderByType type = OrderByType.Asc) + { + _OrderBy(expression); + return this; + } + #endregion + + #region GroupBy + public new ISugarQueryable GroupBy(Expression> expression) + { + _GroupBy(expression); + return this; + } + public ISugarQueryable GroupBy(Expression> expression) + { + _GroupBy(expression); + return this; + } + public ISugarQueryable GroupBy(Expression> expression) + { + _GroupBy(expression); + return this; + } + public ISugarQueryable GroupBy(Expression> expression) + { + _GroupBy(expression); + return this; + } + #endregion } public partial class QueryableProvider : QueryableProvider, ISugarQueryable { diff --git a/SqlSugar/Interface/IQueryable.cs b/SqlSugar/Interface/IQueryable.cs index 839ef2660..083c54eae 100644 --- a/SqlSugar/Interface/IQueryable.cs +++ b/SqlSugar/Interface/IQueryable.cs @@ -155,7 +155,32 @@ namespace SqlSugar } public partial interface ISugarQueryable : ISugarQueryable { + #region Where + new ISugarQueryable Where(Expression> expression); + ISugarQueryable Where(Expression> expression); + ISugarQueryable Where(Expression> expression); + ISugarQueryable Where(Expression> expression); + #endregion + + #region Select + ISugarQueryable Select(Expression> expression); + ISugarQueryable Select(Expression> expression); + ISugarQueryable Select(Expression> expression); + #endregion + + #region OrderBy + new ISugarQueryable OrderBy(Expression> expression, OrderByType type = OrderByType.Asc); + ISugarQueryable OrderBy(Expression> expression, OrderByType type = OrderByType.Asc); + ISugarQueryable OrderBy(Expression> expression, OrderByType type = OrderByType.Asc); + ISugarQueryable OrderBy(Expression> expression, OrderByType type = OrderByType.Asc); + #endregion + #region GroupBy + new ISugarQueryable GroupBy(Expression> expression); + ISugarQueryable GroupBy(Expression> expression); + ISugarQueryable GroupBy(Expression> expression); + ISugarQueryable GroupBy(Expression> expression); + #endregion } //public partial interface ISugarQueryable : ISugarQueryable //{