This commit is contained in:
610262374@qq.com
2019-06-10 13:58:12 +08:00
parent 7f3bd5d6c8
commit 1b0f730ccf

View File

@@ -184,7 +184,7 @@ namespace SqlSugar
{
using (dataReader)
{
if (type.Name.Contains("KeyValuePair"))
if (type.Name.StartsWith("KeyValuePair"))
{
return GetKeyValueList<T>(type, dataReader);
}
@@ -206,7 +206,7 @@ namespace SqlSugar
{
using (dataReader)
{
if (type.Name.Contains("KeyValuePair"))
if (type.Name.StartsWith("KeyValuePair"))
{
return await GetKeyValueListAsync<T>(type, dataReader);
}
@@ -226,7 +226,7 @@ namespace SqlSugar
}
public virtual List<T> DataReaderToListNoUsing<T>(Type type, IDataReader dataReader)
{
if (type.Name.Contains("KeyValuePair"))
if (type.Name.StartsWith("KeyValuePair"))
{
return GetKeyValueList<T>(type, dataReader);
}
@@ -245,7 +245,7 @@ namespace SqlSugar
}
public virtual Task<List<T>> DataReaderToListNoUsingAsync<T>(Type type, IDataReader dataReader)
{
if (type.Name.Contains("KeyValuePair"))
if (type.Name.StartsWith("KeyValuePair"))
{
return GetKeyValueListAsync<T>(type, dataReader);
}