Skip to content

Commit 36a9608

Browse files
committed
Merge branch 'dev'
2 parents bc18530 + d302371 commit 36a9608

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+141
-174
lines changed

Directory.Build.props

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
<Project>
22

3+
<PropertyGroup>
4+
<IncludeSymbols>true</IncludeSymbols>
5+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
6+
</PropertyGroup>
7+
38
<!-- Reference .NET Framework reference assemblies, allows building on environments without .NET Framework installed
49
(e.g. Linux). Gets ignored on non-framework TFMs. -->
510
<ItemGroup>
6-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.1" PrivateAssets="All" />
11+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" PrivateAssets="All" />
712
</ItemGroup>
813

914
</Project>

Directory.Build.targets

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project>
2+
<ItemGroup>
3+
<PackageReference Update="Npgsql" Version="4.0.10" />
4+
<PackageReference Update="Npgsql.LegacyPostgis" Version="4.0.10" />
5+
<PackageReference Update="EntityFramework" Version="6.3.0" />
6+
7+
<PackageReference Update="NUnit" Version="3.12.0" />
8+
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.3.0" />
9+
<PackageReference Update="NUnit3TestAdapter" Version="3.15.1" />
10+
<PackageReference Update="NLog" Version="4.6.7" />
11+
</ItemGroup>
12+
</Project>

test/EntityFramework6.Npgsql.Tests/App.config renamed to EF6.PG.Tests/App.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
3030
<dependentAssembly>
3131
<assemblyIdentity name="Npgsql" publicKeyToken="5d8b90d52f46fda7" culture="neutral" />
32-
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.7.0" />
32+
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
3333
</dependentAssembly>
3434
</assemblyBinding>
3535
</runtime>

EF6.PG.Tests/EF6.PG.Tests.csproj

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<LangVersion>latest</LangVersion>
4+
<TargetFrameworks>net45;netcoreapp3.0</TargetFrameworks>
5+
<RootNamespace>EntityFramework6.Npgsql.Tests</RootNamespace>
6+
<AssemblyName>EntityFramework6.Npgsql.Tests</AssemblyName>
7+
</PropertyGroup>
8+
<ItemGroup>
9+
<PackageReference Include="EntityFramework" />
10+
<PackageReference Include="NUnit" />
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" />
12+
<PackageReference Include="NUnit3TestAdapter" />
13+
<PackageReference Include="NLog" />
14+
<PackageReference Include="Npgsql.LegacyPostgis" />
15+
</ItemGroup>
16+
<ItemGroup>
17+
<ProjectReference Include="..\EF6.PG\EF6.PG.csproj" />
18+
</ItemGroup>
19+
</Project>

EF6.PG.Tests/Support/AssemblySetup.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System.Data.Entity;
2+
using NLog.Config;
3+
using NLog.Targets;
4+
using NUnit.Framework;
5+
using Npgsql.Logging;
6+
using EntityFramework6.Npgsql.Tests;
7+
using EntityFramework6.Npgsql.Tests.Support;
8+
9+
// ReSharper disable CheckNamespace
10+
11+
[SetUpFixture]
12+
public class AssemblySetup
13+
{
14+
[OneTimeSetUp]
15+
public void RegisterDbProvider()
16+
{
17+
var config = new LoggingConfiguration();
18+
var consoleTarget = new ConsoleTarget();
19+
consoleTarget.Layout = @"${message} ${exception:format=tostring}";
20+
config.AddTarget("console", consoleTarget);
21+
var rule = new LoggingRule("*", NLog.LogLevel.Info, consoleTarget);
22+
config.LoggingRules.Add(rule);
23+
NLog.LogManager.Configuration = config;
24+
25+
NpgsqlLogManager.Provider = new NLogLoggingProvider();
26+
NpgsqlLogManager.IsParameterLoggingEnabled = true;
27+
28+
DbConfiguration.SetConfiguration(new TestDbConfiguration());
29+
}
30+
}

test/EntityFramework6.Npgsql.Tests/Support/TestBase.cs renamed to EF6.PG.Tests/Support/TestBase.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ public abstract class TestBase
2323

2424
string _connectionString;
2525

26-
static bool _loggingSetUp;
27-
2826
/// <summary>
2927
/// Unless the NPGSQL_TEST_DB environment variable is defined, this is used as the connection string for the
3028
/// test database.
@@ -36,28 +34,9 @@ public abstract class TestBase
3634
[OneTimeSetUp]
3735
public virtual void TestFixtureSetup()
3836
{
39-
SetupLogging();
4037
_log.Debug("Connection string is: " + ConnectionString);
4138
}
4239

43-
protected virtual void SetupLogging()
44-
{
45-
var config = new LoggingConfiguration();
46-
var consoleTarget = new ConsoleTarget();
47-
consoleTarget.Layout = @"${message} ${exception:format=tostring}";
48-
config.AddTarget("console", consoleTarget);
49-
var rule = new LoggingRule("*", NLog.LogLevel.Debug, consoleTarget);
50-
config.LoggingRules.Add(rule);
51-
NLog.LogManager.Configuration = config;
52-
53-
if (!_loggingSetUp)
54-
{
55-
NpgsqlLogManager.Provider = new NLogLoggingProvider();
56-
NpgsqlLogManager.IsParameterLoggingEnabled = true;
57-
_loggingSetUp = true;
58-
}
59-
}
60-
6140
#endregion
6241

6342
#region Utilities for use by tests
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
using System.Data.Entity;
3+
using Npgsql;
4+
5+
namespace EntityFramework6.Npgsql.Tests.Support
6+
{
7+
public class TestDbConfiguration : DbConfiguration
8+
{
9+
public TestDbConfiguration()
10+
{
11+
SetProviderFactory("Npgsql", NpgsqlFactory.Instance);
12+
SetProviderServices("Npgsql", NpgsqlServices.Instance);
13+
}
14+
}
15+
}
File renamed without changes.

src/EntityFramework6.Npgsql/EntityFramework6.Npgsql.csproj renamed to EF6.PG/EF6.PG.csproj

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@
55
<Copyright>Copyright 2019 © The Npgsql Development Team</Copyright>
66
<Company>Npgsql</Company>
77
<PackageTags>npgsql postgresql postgres data database entity framework ef orm</PackageTags>
8-
<VersionPrefix>3.2.1.1</VersionPrefix>
8+
<VersionPrefix>6.3.0</VersionPrefix>
99
<LangVersion>latest</LangVersion>
10-
<TargetFramework>net45</TargetFramework>
10+
<TargetFrameworks>net45;netstandard21</TargetFrameworks>
1111
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1212
<NoWarn>CS1591</NoWarn>
1313
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1414
<RootNamespace>Npgsql</RootNamespace>
15+
<AssemblyName>EntityFramework6.Npgsql</AssemblyName>
1516
<GenerateDocumentationFile>true</GenerateDocumentationFile>
16-
<AssemblyOriginatorKeyFile>../../Npgsql.snk</AssemblyOriginatorKeyFile>
17+
<AssemblyOriginatorKeyFile>../Npgsql.snk</AssemblyOriginatorKeyFile>
1718
<SignAssembly>true</SignAssembly>
1819
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
19-
<PackageProjectUrl>http://www.npgsql.org</PackageProjectUrl>
20-
<PackageIconUrl>http://www.npgsql.org/img/postgresql.gif</PackageIconUrl>
20+
<PackageProjectUrl>https://github.com/npgsql/EntityFramework6.Npgsql</PackageProjectUrl>
21+
<PackageIcon>postgresql.png</PackageIcon>
2122
<PackageLicenseExpression>PostgreSQL</PackageLicenseExpression>
2223
<RepositoryType>git</RepositoryType>
2324
<RepositoryUrl>git://github.com/npgsql/EntityFramework6.Npgsql</RepositoryUrl>
@@ -27,9 +28,13 @@
2728
<EmbeddedResource Include="Resources/*" />
2829
</ItemGroup>
2930
<ItemGroup>
30-
<None Update="install.ps1" Pack="true" PackagePath="\tools" />
31+
<None Include="content/App.config.install.xdt" Pack="true" PackagePath="content/net45" />
32+
<None Include="content/App.config.transform" Pack="true" PackagePath="content/net45" />
33+
<None Include="content/Web.config.install.xdt" Pack="true" PackagePath="content/net45" />
34+
<None Include="content/Web.config.transform" Pack="true" PackagePath="content/net45" />
35+
<None Include="postgresql.png" Pack="true" PackagePath="" />
3136
</ItemGroup>
32-
<ItemGroup>
37+
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
3338
<Reference Include="System" />
3439
<Reference Include="System.Core" />
3540
<Reference Include="System.Data" />
@@ -39,7 +44,7 @@
3944
<Reference Include="System.ComponentModel.DataAnnotations" />
4045
</ItemGroup>
4146
<ItemGroup>
42-
<PackageReference Include="Npgsql" Version="4.0.7" />
43-
<PackageReference Include="EntityFramework" Version="6.2.0" />
47+
<PackageReference Include="Npgsql" />
48+
<PackageReference Include="EntityFramework" />
4449
</ItemGroup>
4550
</Project>

EF6.PG/content/App.config.install.xdt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
2+
<entityFramework>
3+
<defaultConnectionFactory xdt:Transform="Remove" />
4+
<defaultConnectionFactory type="Npgsql.NpgsqlConnectionFactory, EntityFramework6.Npgsql" xdt:Transform="Insert" />
5+
<providers>
6+
<provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, EntityFramework6.Npgsql" xdt:Transform="InsertIfMissing" xdt:Locator="Match(invariantName)" />
7+
</providers>
8+
</entityFramework>
9+
</configuration>

EF6.PG/content/App.config.transform

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<configuration>
2+
<configSections>
3+
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
4+
</configSections>
5+
<system.data>
6+
<DbProviderFactories>
7+
<remove invariant="Npgsql" />
8+
<add name="Npgsql Provider" invariant="Npgsql" description=".NET Framework Data Provider for PostgreSQL" type="Npgsql.NpgsqlFactory, Npgsql, Version=4.0.10.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
9+
</DbProviderFactories>
10+
</system.data>
11+
</configuration>

EF6.PG/content/Web.config.install.xdt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
2+
<entityFramework>
3+
<defaultConnectionFactory xdt:Transform="Remove" />
4+
<defaultConnectionFactory type="Npgsql.NpgsqlConnectionFactory, EntityFramework6.Npgsql" xdt:Transform="Insert" />
5+
<providers>
6+
<provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, EntityFramework6.Npgsql" xdt:Transform="InsertIfMissing" xdt:Locator="Match(invariantName)" />
7+
</providers>
8+
</entityFramework>
9+
</configuration>

EF6.PG/content/Web.config.transform

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<configuration>
2+
<configSections>
3+
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
4+
</configSections>
5+
<system.data>
6+
<DbProviderFactories>
7+
<remove invariant="Npgsql" />
8+
<add name="Npgsql Provider" invariant="Npgsql" description=".NET Framework Data Provider for PostgreSQL" type="Npgsql.NpgsqlFactory, Npgsql, Version=4.0.10.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
9+
</DbProviderFactories>
10+
</system.data>
11+
</configuration>

EF6.PG/postgresql.png

9.45 KB

EntityFramework6.Npgsql.sln

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@ VisualStudioVersion = 15.0.27703.2035
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4A5A60DD-41B6-40BF-B677-227A921ECCC8}"
77
ProjectSection(SolutionItems) = preProject
8+
Directory.Build.props = Directory.Build.props
9+
Directory.Build.targets = Directory.Build.targets
810
Npgsql.snk = Npgsql.snk
911
EndProjectSection
1012
EndProject
11-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8537E50E-CF7F-49CB-B4EF-3E2A1B11F050}"
13+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EF6.PG", "EF6.PG\EF6.PG.csproj", "{3EC85CBA-5B79-11E3-8104-0022198AB089}"
1214
EndProject
13-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{ED612DB1-AB32-4603-95E7-891BACA71C39}"
14-
EndProject
15-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFramework6.Npgsql", "src\EntityFramework6.Npgsql\EntityFramework6.Npgsql.csproj", "{3EC85CBA-5B79-11E3-8104-0022198AB089}"
16-
EndProject
17-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFramework6.Npgsql.Tests", "test\EntityFramework6.Npgsql.Tests\EntityFramework6.Npgsql.Tests.csproj", "{4A0A42DE-C8B8-11E4-8EC9-005056A163A4}"
15+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EF6.PG.Tests", "EF6.PG.Tests\EF6.PG.Tests.csproj", "{4A0A42DE-C8B8-11E4-8EC9-005056A163A4}"
1816
EndProject
1917
Global
2018
GlobalSection(SolutionConfigurationPlatforms) = preSolution

doc/index.md

Lines changed: 0 additions & 116 deletions
This file was deleted.

doc/toc.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/EntityFramework6.Npgsql/install.ps1

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)