mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Synchronization code
This commit is contained in:
parent
c89f6a98e4
commit
9aea119161
@ -442,6 +442,16 @@ namespace SqlSugar
|
||||
var readerValues = DataReaderToDictionary(reader, tType);
|
||||
var mappingKeys = this.QueryBuilder?.MappingKeys;
|
||||
var result = new Dictionary<string, object>();
|
||||
if (UtilMethods.IsTuple(tType, classProperties))
|
||||
{
|
||||
var index = 0;
|
||||
foreach (var item in classProperties)
|
||||
{
|
||||
result.Add("Item" + (index + 1), reader.GetValue(index));
|
||||
index++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
foreach (var item in classProperties)
|
||||
{
|
||||
var name = item.Name;
|
||||
|
@ -18,6 +18,15 @@ namespace SqlSugar
|
||||
{
|
||||
public class UtilMethods
|
||||
{
|
||||
public static bool IsTuple(Type tType, List<PropertyInfo> classProperties)
|
||||
{
|
||||
if (classProperties?.Any() != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return tType.FullName?.StartsWith("System.Tuple`") == true && classProperties.FirstOrDefault()?.Name == "Item1";
|
||||
}
|
||||
|
||||
internal static string GetTableByDbLink(SqlSugarProvider context,string tableName, string oldTableName, TenantAttribute attr)
|
||||
{
|
||||
QueryBuilder queryBuilder=InstanceFactory.GetQueryBuilderWithContext(context);
|
||||
|
Loading…
Reference in New Issue
Block a user