diff --git a/Program/Program.cs b/Program/Program.cs
index 9b4c2845..319b992b 100644
--- a/Program/Program.cs
+++ b/Program/Program.cs
@@ -111,4 +111,4 @@ private static QueryFactory SqlServerQueryFactory()
}
}
-}
+}
\ No newline at end of file
diff --git a/Program/Program.csproj b/Program/Program.csproj
index 6341ecef..e05a705a 100644
--- a/Program/Program.csproj
+++ b/Program/Program.csproj
@@ -1,5 +1,8 @@
-
+
+ Exe
+ net5.0
+
@@ -12,10 +15,5 @@
-
- Exe
- false
- netcoreapp2.0
-
-
+
diff --git a/SqlKata.Execution/QueryFactory.cs b/SqlKata.Execution/QueryFactory.cs
index b10677ab..349f4147 100644
--- a/SqlKata.Execution/QueryFactory.cs
+++ b/SqlKata.Execution/QueryFactory.cs
@@ -698,7 +698,7 @@ private static IEnumerable handleIncludes(Query query, IEnumerable resu
}
var localIds = dynamicResult.Where(x => x[include.LocalKey] != null)
- .Select(x => x[include.LocalKey].ToString())
+ .Select(x => x[include.LocalKey])
.ToList();
if (!localIds.Any())
@@ -731,7 +731,8 @@ private static IEnumerable handleIncludes(Query query, IEnumerable resu
var foreignIds = dynamicResult
.Where(x => x[include.ForeignKey] != null)
- .Select(x => x[include.ForeignKey].ToString())
+ // .Select(x => x[include.ForeignKey].ToString())
+ .Select(x => x[include.ForeignKey])
.ToList();
if (!foreignIds.Any())
@@ -799,7 +800,7 @@ private static async Task> handleIncludesAsync(Query query, IE
}
var localIds = dynamicResult.Where(x => x[include.LocalKey] != null)
- .Select(x => x[include.LocalKey].ToString())
+ .Select(x => x[include.LocalKey])
.ToList();
if (!localIds.Any())
@@ -828,7 +829,8 @@ private static async Task> handleIncludesAsync(Query query, IE
}
var foreignIds = dynamicResult.Where(x => x[include.ForeignKey] != null)
- .Select(x => x[include.ForeignKey].ToString())
+ // .Select(x => x[include.ForeignKey].ToString())
+ .Select(x => x[include.ForeignKey])
.ToList();
if (!foreignIds.Any())