ValueObject json type

This commit is contained in:
sunkaixuan
2024-06-25 13:24:44 +08:00
parent 662074fefe
commit 009ea48c0a

View File

@@ -154,6 +154,10 @@ namespace SqlSugar
{ {
item.PropertyInfo.SetValue(parentObj,UtilMethods.ChangeType2(value, item.PropertyInfo.PropertyType)); item.PropertyInfo.SetValue(parentObj,UtilMethods.ChangeType2(value, item.PropertyInfo.PropertyType));
} }
else if (item.IsJson)
{
item.PropertyInfo.SetValue(parentObj, Newtonsoft.Json.JsonConvert.DeserializeObject(dataReader.GetValue(itemIndex)?.ToString(), item.PropertyInfo.PropertyType));
}
else else
{ {
item.PropertyInfo.SetValue(parentObj, dataReader.GetValue(itemIndex)); item.PropertyInfo.SetValue(parentObj, dataReader.GetValue(itemIndex));