mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Add T Check
This commit is contained in:
parent
6f86ce007f
commit
f14064d3d2
@ -254,6 +254,7 @@ namespace SqlSugar
|
||||
}
|
||||
protected ISugarQueryable<T> CreateQueryable<T>(ISugarQueryable<T> result)
|
||||
{
|
||||
Check.Exception(typeof(T).IsClass()==false|| typeof(T).GetConstructors().Length==0, "Queryable<{0}> Error ,{0} is invalid , need is a class,and can new().", typeof(T).Name);
|
||||
var sqlBuilder = InstanceFactory.GetSqlbuilder(CurrentConnectionConfig);
|
||||
result.Context = this.Context;
|
||||
result.SqlBuilder = sqlBuilder;
|
||||
|
Loading…
Reference in New Issue
Block a user