|
|
@ -7,6 +7,7 @@ using System.Dynamic; |
|
|
|
using System.Linq; |
|
|
|
using System.Reflection; |
|
|
|
using System.Text; |
|
|
|
using System.Text.RegularExpressions; |
|
|
|
using System.Threading.Tasks; |
|
|
|
namespace SqlSugar |
|
|
|
{ |
|
|
@ -276,9 +277,21 @@ namespace SqlSugar |
|
|
|
var name = item.Name; |
|
|
|
var typeName = tType.Name; |
|
|
|
if (item.PropertyType.IsClass()) |
|
|
|
{ |
|
|
|
if (readerValues != null && |
|
|
|
readerValues.Count == 1 && |
|
|
|
readerValues.First().Key == name && |
|
|
|
readerValues.First().Value!=null&& |
|
|
|
readerValues.First().Value.GetType()==UtilConstants.StringType&& |
|
|
|
Regex.IsMatch(readerValues.First().Value.ObjToString(), @"^\{.+\}$")) |
|
|
|
{ |
|
|
|
result.Add(name, DeserializeObject<Dictionary<string,object>>(readerValues.First().Value.ObjToString())); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
result.Add(name, DataReaderToDynamicList_Part(readerValues, item, reval)); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (readerValues.Any(it => it.Key.Equals(name, StringComparison.CurrentCultureIgnoreCase))) |
|
|
|