This commit is contained in:
grzegorz.russek
2022-03-04 10:40:28 +00:00
parent 0984883f68
commit 53ba71f808
2 changed files with 4 additions and 4 deletions

View File

@@ -5465,7 +5465,7 @@ namespace DynamORM
mainResult = cache.EnumerateReader().ToList(); mainResult = cache.EnumerateReader().ToList();
} }
else if (argType.IsValueType || types[0] == typeof(string)) else if (argType.IsValueType || argType == typeof(string))
{ {
Type listType = typeof(List<>).MakeGenericType(new Type[] { argType }); Type listType = typeof(List<>).MakeGenericType(new Type[] { argType });
IList listInstance = (IList)Activator.CreateInstance(listType); IList listInstance = (IList)Activator.CreateInstance(listType);
@@ -5481,7 +5481,7 @@ namespace DynamORM
mainResult = listInstance; mainResult = listInstance;
} }
else if (types[0] == typeof(Guid)) else if (argType == typeof(Guid))
{ {
Type listType = typeof(List<>).MakeGenericType(new Type[] { argType }); Type listType = typeof(List<>).MakeGenericType(new Type[] { argType });
IList listInstance = (IList)Activator.CreateInstance(listType); IList listInstance = (IList)Activator.CreateInstance(listType);

View File

@@ -203,7 +203,7 @@ namespace DynamORM
mainResult = cache.EnumerateReader().ToList(); mainResult = cache.EnumerateReader().ToList();
} }
else if (argType.IsValueType || types[0] == typeof(string)) else if (argType.IsValueType || argType == typeof(string))
{ {
Type listType = typeof(List<>).MakeGenericType(new Type[] { argType }); Type listType = typeof(List<>).MakeGenericType(new Type[] { argType });
IList listInstance = (IList)Activator.CreateInstance(listType); IList listInstance = (IList)Activator.CreateInstance(listType);
@@ -219,7 +219,7 @@ namespace DynamORM
mainResult = listInstance; mainResult = listInstance;
} }
else if (types[0] == typeof(Guid)) else if (argType == typeof(Guid))
{ {
Type listType = typeof(List<>).MakeGenericType(new Type[] { argType }); Type listType = typeof(List<>).MakeGenericType(new Type[] { argType });
IList listInstance = (IList)Activator.CreateInstance(listType); IList listInstance = (IList)Activator.CreateInstance(listType);