mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-31 15:56:25 +08:00
Support aot
This commit is contained in:
parent
520b48ef81
commit
7d930b2c6a
@ -252,7 +252,7 @@ namespace SqlSugar
|
||||
var isMapping = IsMappingColumns;
|
||||
var columnInfo = new DbColumnInfo()
|
||||
{
|
||||
Value = PropertyCallAdapterProvider<T>.GetInstance(column.PropertyName).InvokeGet(item),
|
||||
Value = GetValue(item,column),
|
||||
DbColumnName = column.DbColumnName,
|
||||
PropertyName = column.PropertyName,
|
||||
PropertyType = UtilMethods.GetUnderType(column.PropertyInfo),
|
||||
@ -316,6 +316,17 @@ namespace SqlSugar
|
||||
}
|
||||
}
|
||||
}
|
||||
private static object GetValue(T item, EntityColumnInfo column)
|
||||
{
|
||||
if (StaticConfig.EnableAot)
|
||||
{
|
||||
return column.PropertyInfo.GetValue(item, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
return PropertyCallAdapterProvider<T>.GetInstance(column.PropertyName).InvokeGet(item);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetDbColumnName(string propertyName)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user