Update Queryable(Queryable)

This commit is contained in:
sunkaixuan 2025-03-20 14:35:05 +08:00
parent 47c9925634
commit cea101d556

View File

@ -432,10 +432,12 @@ namespace SqlSugar
public virtual ISugarQueryable<T> Queryable<T>(ISugarQueryable<T> queryable)
{
var sqlobj = queryable.ToSql();
var QueryBuilder = queryable.QueryBuilder;
var newQueryable = this.SqlQueryable<object>(sqlobj.Key).AddParameters(sqlobj.Value);
var result = newQueryable.Select<T>(newQueryable.QueryBuilder.SelectValue+"");
result.QueryBuilder.IsSqlQuery = false;
result.QueryBuilder.NoCheckInclude = true;
result.QueryBuilder.WhereIndex = (QueryBuilder.WhereIndex + 1);
result.QueryBuilder.Includes = queryable.QueryBuilder.Includes?.ToList();
return result;
}