From 503370d059a61379f365219e59d5c4b9bc514bb9 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 9 Aug 2017 08:14:45 -0400 Subject: [PATCH] TVP type name --- src/Core/Utilities/CoreHelpers.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Core/Utilities/CoreHelpers.cs b/src/Core/Utilities/CoreHelpers.cs index ed442e9cb7..2d23f6a1b0 100644 --- a/src/Core/Utilities/CoreHelpers.cs +++ b/src/Core/Utilities/CoreHelpers.cs @@ -57,8 +57,9 @@ namespace Bit.Core.Utilities public static DataTable ToArrayTVP(this IEnumerable values, string columnName) { - var table = new DataTable($"{columnName}Array", "dbo"); + var table = new DataTable(); table.Columns.Add(columnName, typeof(T)); + table.ExtendedProperties["dapper:TypeName"] = $"[dbo].[{columnName}Array]"; if(values != null) { @@ -73,7 +74,8 @@ namespace Bit.Core.Utilities public static DataTable ToArrayTVP(this IEnumerable values) { - var table = new DataTable("SelectionReadOnlyArray", "dbo"); + var table = new DataTable(); + table.ExtendedProperties["dapper:TypeName"] = "[dbo].[SelectionReadOnlyArray]"; var idColumn = new DataColumn("Id", typeof(Guid)); table.Columns.Add(idColumn);