Support AOT

This commit is contained in:
sunkaixuan
2024-01-13 15:38:51 +08:00
parent 90d433c1a2
commit 27d61bcf3f

View File

@@ -1924,7 +1924,14 @@ namespace SqlSugar
}
else if (entityType.IsAnonymousType() || isComplexModel||StaticConfig.EnableAot)
{
result = await this.Context.Utilities.DataReaderToListAsync<TResult>(dataReader);
if (entityType.IsClass() == false && StaticConfig.EnableAot)
{
result =await this.Bind.DataReaderToListAsync<TResult>(entityType, dataReader);
}
else
{
result = await this.Context.Utilities.DataReaderToListAsync<TResult>(dataReader);
}
}
else
{