Skip to content

Commit 2d783a9

Browse files
committed
Depend on Npgsql 4.0.2
1 parent 9722eab commit 2d783a9

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

src/EntityFramework6.Npgsql/EntityFramework6.Npgsql.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<Reference Include="System.ComponentModel.DataAnnotations" />
4040
</ItemGroup>
4141
<ItemGroup>
42-
<PackageReference Include="Npgsql" Version="3.2.5" />
42+
<PackageReference Include="Npgsql" Version="4.0.2" />
4343
<PackageReference Include="EntityFramework" Version="6.2.0" />
4444
</ItemGroup>
4545
</Project>

src/EntityFramework6.Npgsql/NpgsqlProviderManifest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ internal static NpgsqlDbType GetNpgsqlDbType(PrimitiveTypeKind primitiveType)
7979
case PrimitiveTypeKind.DateTime:
8080
return NpgsqlDbType.Timestamp;
8181
case PrimitiveTypeKind.DateTimeOffset:
82-
return NpgsqlDbType.TimestampTZ;
82+
return NpgsqlDbType.TimestampTz;
8383
case PrimitiveTypeKind.Decimal:
8484
return NpgsqlDbType.Numeric;
8585
case PrimitiveTypeKind.Double:

test/EntityFramework6.Npgsql.Tests/App.config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,12 @@
2525
<add name="Npgsql Data Provider" invariant="Npgsql" support="FF" description=".Net Framework Data Provider for Postgresql" type="Npgsql.NpgsqlFactory, Npgsql" />
2626
</DbProviderFactories>
2727
</system.data>
28+
<runtime>
29+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
30+
<dependentAssembly>
31+
<assemblyIdentity name="Npgsql" publicKeyToken="5d8b90d52f46fda7" culture="neutral" />
32+
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.2.0" />
33+
</dependentAssembly>
34+
</assemblyBinding>
35+
</runtime>
2836
</configuration>

test/EntityFramework6.Npgsql.Tests/EntityFramework6.Npgsql.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" />
1212
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
1313
<PackageReference Include="NLog" Version="4.4.12" />
14+
<PackageReference Include="Npgsql.LegacyPostgis" Version="1.0.0" />
1415
</ItemGroup>
1516
</Project>

test/EntityFramework6.Npgsql.Tests/Spatial/PostgisServiceTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using Npgsql;
3+
using Npgsql.LegacyPostgis;
34
using Npgsql.Spatial;
4-
using NpgsqlTypes;
55
using NUnit.Framework;
66
// ReSharper disable RedundantExplicitArrayCreation
77

@@ -1321,6 +1321,7 @@ PostgisServices CreatePostgisServices()
13211321

13221322
using (var conn = new NpgsqlConnection(ConnectionString))
13231323
{
1324+
NpgsqlConnection.GlobalTypeMapper.UseLegacyPostgis();
13241325
conn.Open();
13251326
using (var cmd = new NpgsqlCommand("CREATE EXTENSION IF NOT EXISTS postgis", conn))
13261327
cmd.ExecuteNonQuery();

0 commit comments

Comments
 (0)