Browse Source

Synchronization code

pull/31/head
sunkaixuan 2 years ago
parent
commit
a43935568d
  1. 8
      Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs
  2. 8
      Src/Asp.NetCore2/SqlSugar/Infrastructure/ContextMethods.cs

8
Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs

@ -388,10 +388,6 @@ namespace SqlSugar
{ {
result.Add(name, DeserializeObject<Dictionary<string, object>>(readerValues.First(it => it.Key.EqualCase(name)).Value.ObjToString())); result.Add(name, DeserializeObject<Dictionary<string, object>>(readerValues.First(it => it.Key.EqualCase(name)).Value.ObjToString()));
} }
else if (IsArrayItem(readerValues, item))
{
result.Add(name, DeserializeObject<string[]>(readerValues.First(y => y.Key.EqualCase(item.Name)).Value + ""));
}
else if (IsJsonList(readerValues, item)) else if (IsJsonList(readerValues, item))
{ {
var json = readerValues.First(y => y.Key.EqualCase(item.Name)).Value.ToString(); var json = readerValues.First(y => y.Key.EqualCase(item.Name)).Value.ToString();
@ -405,6 +401,10 @@ namespace SqlSugar
{ {
result.Add(name, readerValues[item.Name.ToLower()]); result.Add(name, readerValues[item.Name.ToLower()]);
} }
else if (IsArrayItem(readerValues, item))
{
result.Add(name, DeserializeObject<string[]>(readerValues.First(y => y.Key.EqualCase(item.Name)).Value + ""));
}
else else
{ {
result.Add(name, DataReaderToDynamicList_Part(readerValues, item, reval, mappingKeys)); result.Add(name, DataReaderToDynamicList_Part(readerValues, item, reval, mappingKeys));

8
Src/Asp.NetCore2/SqlSugar/Infrastructure/ContextMethods.cs

@ -388,10 +388,6 @@ namespace SqlSugar
{ {
result.Add(name, DeserializeObject<Dictionary<string, object>>(readerValues.First(it => it.Key.EqualCase(name)).Value.ObjToString())); result.Add(name, DeserializeObject<Dictionary<string, object>>(readerValues.First(it => it.Key.EqualCase(name)).Value.ObjToString()));
} }
else if (IsArrayItem(readerValues, item))
{
result.Add(name, DeserializeObject<string[]>(readerValues.First(y => y.Key.EqualCase(item.Name)).Value + ""));
}
else if (IsJsonList(readerValues, item)) else if (IsJsonList(readerValues, item))
{ {
var json = readerValues.First(y => y.Key.EqualCase(item.Name)).Value.ToString(); var json = readerValues.First(y => y.Key.EqualCase(item.Name)).Value.ToString();
@ -405,6 +401,10 @@ namespace SqlSugar
{ {
result.Add(name, readerValues[item.Name.ToLower()]); result.Add(name, readerValues[item.Name.ToLower()]);
} }
else if (IsArrayItem(readerValues, item))
{
result.Add(name, DeserializeObject<string[]>(readerValues.First(y => y.Key.EqualCase(item.Name)).Value + ""));
}
else else
{ {
result.Add(name, DataReaderToDynamicList_Part(readerValues, item, reval, mappingKeys)); result.Add(name, DataReaderToDynamicList_Part(readerValues, item, reval, mappingKeys));

Loading…
Cancel
Save