1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

local dapper build

This commit is contained in:
Kyle Spearrin
2017-08-22 12:38:48 -04:00
parent 0372ae66f9
commit 7a13414853
3 changed files with 15 additions and 4 deletions

View File

@ -59,7 +59,6 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="1.1.3" />
<PackageReference Include="Dapper" Version="1.50.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="1.1.2" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
@ -85,7 +84,11 @@
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
<PackageReference Include="System.Data.SqlClient" Version="4.4.0-preview2-25405-01" />
<PackageReference Include="System.Data.SqlClient" Version="4.4.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Dapper\Dapper\Dapper.csproj" />
</ItemGroup>
</Project>

View File

@ -10,6 +10,7 @@ using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Text.RegularExpressions;
using Dapper;
namespace Bit.Core.Utilities
{
@ -58,8 +59,8 @@ namespace Bit.Core.Utilities
public static DataTable ToArrayTVP<T>(this IEnumerable<T> values, string columnName)
{
var table = new DataTable();
table.SetTypeName($"[dbo].[{columnName}Array]");
table.Columns.Add(columnName, typeof(T));
table.ExtendedProperties["dapper:TypeName"] = $"[dbo].[{columnName}Array]";
if(values != null)
{
@ -75,7 +76,7 @@ namespace Bit.Core.Utilities
public static DataTable ToArrayTVP(this IEnumerable<SelectionReadOnly> values)
{
var table = new DataTable();
table.ExtendedProperties["dapper:TypeName"] = "[dbo].[SelectionReadOnlyArray]";
table.SetTypeName("[dbo].[SelectionReadOnlyArray]");
var idColumn = new DataColumn("Id", typeof(Guid));
table.Columns.Add(idColumn);