Browse Source

Add AsNavQueryable

pull/16/MERGE
sunkaixuan 3 years ago
parent
commit
8c44ce9dd3
  1. 5
      Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/IncludesHelper.cs
  2. 1
      Src/Asp.Net/SqlSugar/Interface/IIncludes.cs

5
Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/IncludesHelper.cs

@ -45,7 +45,10 @@ namespace SqlSugar
if (this.QueryBuilder.Includes == null) this.QueryBuilder.Includes = new List<object>();
this.QueryBuilder.Includes.Add(navigat);
}
public NavISugarQueryable<T> AsNavQueryable()
{
return GetNavSugarQueryable();
}
private NavISugarQueryable<T> GetNavSugarQueryable()
{
var result= new NavQueryableProvider<T>();

1
Src/Asp.Net/SqlSugar/Interface/IIncludes.cs

@ -13,6 +13,7 @@ namespace SqlSugar
/// <typeparam name="T"></typeparam>
public partial interface ISugarQueryable<T>
{
NavISugarQueryable<T> AsNavQueryable();
ISugarQueryable<T> Includes<TReturn1>(Expression<Func<T, List<TReturn1>>> include1);
ISugarQueryable<T> Includes<TReturn1>(Expression<Func<T, TReturn1>> include1);
ISugarQueryable<T> Includes<TReturn1, TReturn2>(Expression<Func<T, List<TReturn1>>> include1, Expression<Func<TReturn1, List<TReturn2>>> include2);

Loading…
Cancel
Save