mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 18:48:09 +08:00
Support aot CodeFirst
This commit is contained in:
@@ -1672,7 +1672,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
result = this.Context.Utilities.DataReaderToExpandoObjectListNoUsing(dataReader).Select(it => ((TResult)(object)it)).ToList();
|
result = this.Context.Utilities.DataReaderToExpandoObjectListNoUsing(dataReader).Select(it => ((TResult)(object)it)).ToList();
|
||||||
}
|
}
|
||||||
else if (entityType.IsAnonymousType())
|
else if (entityType.IsAnonymousType()||StaticConfig.EnableAot)
|
||||||
{
|
{
|
||||||
result = this.Context.Utilities.DataReaderToListNoUsing<TResult>(dataReader);
|
result = this.Context.Utilities.DataReaderToListNoUsing<TResult>(dataReader);
|
||||||
}
|
}
|
||||||
@@ -1694,7 +1694,7 @@ namespace SqlSugar
|
|||||||
var list = await this.Context.Utilities.DataReaderToExpandoObjectListAsyncNoUsing(dataReader);
|
var list = await this.Context.Utilities.DataReaderToExpandoObjectListAsyncNoUsing(dataReader);
|
||||||
result = list.Select(it => ((TResult)(object)it)).ToList();
|
result = list.Select(it => ((TResult)(object)it)).ToList();
|
||||||
}
|
}
|
||||||
else if (entityType.IsAnonymousType())
|
else if (entityType.IsAnonymousType() || StaticConfig.EnableAot)
|
||||||
{
|
{
|
||||||
result =await this.Context.Utilities.DataReaderToListAsyncNoUsing<TResult>(dataReader);
|
result =await this.Context.Utilities.DataReaderToListAsyncNoUsing<TResult>(dataReader);
|
||||||
}
|
}
|
||||||
|
@@ -1899,7 +1899,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
result =await this.Context.Utilities.DataReaderToSelectArrayListAsync<TResult>(dataReader);
|
result =await this.Context.Utilities.DataReaderToSelectArrayListAsync<TResult>(dataReader);
|
||||||
}
|
}
|
||||||
else if (entityType.IsAnonymousType() || isComplexModel)
|
else if (entityType.IsAnonymousType() || isComplexModel||StaticConfig.EnableAot)
|
||||||
{
|
{
|
||||||
result = await this.Context.Utilities.DataReaderToListAsync<TResult>(dataReader);
|
result = await this.Context.Utilities.DataReaderToListAsync<TResult>(dataReader);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user