@ -931,11 +931,19 @@ namespace SqlSugar
{
tableQueryables . Add ( this . Clone ( ) . AS ( item . TableName ) ) ;
}
Check . Exception ( tableQueryables . Count = = 0 , ErrorMessage . GetThrowMessage ( "SplitTable error . There are no tables after filtering" , "SplitTable没有筛选出分表,请检查条件和数据库中的表" ) ) ;
var unionall = this . Context . _ UnionAll ( tableQueryables . ToArray ( ) ) ;
if ( tableQueryables . Count = = 0 )
{
var result = this . Context . SqlQueryable < object > ( "-- No table " ) . Select < T > ( ) ;
result . QueryBuilder . SelectValue = null ;
return result ;
}
else
{
var unionall = this . Context . _ UnionAll ( tableQueryables . ToArray ( ) ) ;
return unionall ;
}
//var values= unionall.QueryBuilder.GetSelectValue;
//unionall.QueryBuilder.SelectValue = values;
return unionall ;
}
public ISugarQueryable < T > Distinct ( )
{