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 //{