Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
roji committed Oct 10, 2019
2 parents bc18530 + d302371 commit 36a9608
Showing 56 changed files with 141 additions and 174 deletions.
7 changes: 6 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<Project>

<PropertyGroup>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<!-- Reference .NET Framework reference assemblies, allows building on environments without .NET Framework installed
(e.g. Linux). Gets ignored on non-framework TFMs. -->
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" PrivateAssets="All" />
</ItemGroup>

</Project>
12 changes: 12 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project>
<ItemGroup>
<PackageReference Update="Npgsql" Version="4.0.10" />
<PackageReference Update="Npgsql.LegacyPostgis" Version="4.0.10" />
<PackageReference Update="EntityFramework" Version="6.3.0" />

<PackageReference Update="NUnit" Version="3.12.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Update="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Update="NLog" Version="4.6.7" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Npgsql" publicKeyToken="5d8b90d52f46fda7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.7.0" />
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
19 changes: 19 additions & 0 deletions EF6.PG.Tests/EF6.PG.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<LangVersion>latest</LangVersion>
<TargetFrameworks>net45;netcoreapp3.0</TargetFrameworks>
<RootNamespace>EntityFramework6.Npgsql.Tests</RootNamespace>
<AssemblyName>EntityFramework6.Npgsql.Tests</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EntityFramework" />
<PackageReference Include="NUnit" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="NLog" />
<PackageReference Include="Npgsql.LegacyPostgis" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EF6.PG\EF6.PG.csproj" />
</ItemGroup>
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 30 additions & 0 deletions EF6.PG.Tests/Support/AssemblySetup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System.Data.Entity;
using NLog.Config;
using NLog.Targets;
using NUnit.Framework;
using Npgsql.Logging;
using EntityFramework6.Npgsql.Tests;
using EntityFramework6.Npgsql.Tests.Support;

// ReSharper disable CheckNamespace

[SetUpFixture]
public class AssemblySetup
{
[OneTimeSetUp]
public void RegisterDbProvider()
{
var config = new LoggingConfiguration();
var consoleTarget = new ConsoleTarget();
consoleTarget.Layout = @"${message} ${exception:format=tostring}";
config.AddTarget("console", consoleTarget);
var rule = new LoggingRule("*", NLog.LogLevel.Info, consoleTarget);
config.LoggingRules.Add(rule);
NLog.LogManager.Configuration = config;

NpgsqlLogManager.Provider = new NLogLoggingProvider();
NpgsqlLogManager.IsParameterLoggingEnabled = true;

DbConfiguration.SetConfiguration(new TestDbConfiguration());
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -23,8 +23,6 @@ public abstract class TestBase

string _connectionString;

static bool _loggingSetUp;

/// <summary>
/// Unless the NPGSQL_TEST_DB environment variable is defined, this is used as the connection string for the
/// test database.
@@ -36,28 +34,9 @@ public abstract class TestBase
[OneTimeSetUp]
public virtual void TestFixtureSetup()
{
SetupLogging();
_log.Debug("Connection string is: " + ConnectionString);
}

protected virtual void SetupLogging()
{
var config = new LoggingConfiguration();
var consoleTarget = new ConsoleTarget();
consoleTarget.Layout = @"${message} ${exception:format=tostring}";
config.AddTarget("console", consoleTarget);
var rule = new LoggingRule("*", NLog.LogLevel.Debug, consoleTarget);
config.LoggingRules.Add(rule);
NLog.LogManager.Configuration = config;

if (!_loggingSetUp)
{
NpgsqlLogManager.Provider = new NLogLoggingProvider();
NpgsqlLogManager.IsParameterLoggingEnabled = true;
_loggingSetUp = true;
}
}

#endregion

#region Utilities for use by tests
15 changes: 15 additions & 0 deletions EF6.PG.Tests/Support/TestDbConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Data.Entity;
using Npgsql;

namespace EntityFramework6.Npgsql.Tests.Support
{
public class TestDbConfiguration : DbConfiguration
{
public TestDbConfiguration()
{
SetProviderFactory("Npgsql", NpgsqlFactory.Instance);
SetProviderServices("Npgsql", NpgsqlServices.Instance);
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -5,19 +5,20 @@
<Copyright>Copyright 2019 © The Npgsql Development Team</Copyright>
<Company>Npgsql</Company>
<PackageTags>npgsql postgresql postgres data database entity framework ef orm</PackageTags>
<VersionPrefix>3.2.1.1</VersionPrefix>
<VersionPrefix>6.3.0</VersionPrefix>
<LangVersion>latest</LangVersion>
<TargetFramework>net45</TargetFramework>
<TargetFrameworks>net45;netstandard21</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>CS1591</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RootNamespace>Npgsql</RootNamespace>
<AssemblyName>EntityFramework6.Npgsql</AssemblyName>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyOriginatorKeyFile>../../Npgsql.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>../Npgsql.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<PackageProjectUrl>http://www.npgsql.org</PackageProjectUrl>
<PackageIconUrl>http://www.npgsql.org/img/postgresql.gif</PackageIconUrl>
<PackageProjectUrl>https://github.com/npgsql/EntityFramework6.Npgsql</PackageProjectUrl>
<PackageIcon>postgresql.png</PackageIcon>
<PackageLicenseExpression>PostgreSQL</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>git://github.com/npgsql/EntityFramework6.Npgsql</RepositoryUrl>
@@ -27,9 +28,13 @@
<EmbeddedResource Include="Resources/*" />
</ItemGroup>
<ItemGroup>
<None Update="install.ps1" Pack="true" PackagePath="\tools" />
<None Include="content/App.config.install.xdt" Pack="true" PackagePath="content/net45" />
<None Include="content/App.config.transform" Pack="true" PackagePath="content/net45" />
<None Include="content/Web.config.install.xdt" Pack="true" PackagePath="content/net45" />
<None Include="content/Web.config.transform" Pack="true" PackagePath="content/net45" />
<None Include="postgresql.png" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
@@ -39,7 +44,7 @@
<Reference Include="System.ComponentModel.DataAnnotations" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Npgsql" Version="4.0.7" />
<PackageReference Include="EntityFramework" Version="6.2.0" />
<PackageReference Include="Npgsql" />
<PackageReference Include="EntityFramework" />
</ItemGroup>
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions EF6.PG/content/App.config.install.xdt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<entityFramework>
<defaultConnectionFactory xdt:Transform="Remove" />
<defaultConnectionFactory type="Npgsql.NpgsqlConnectionFactory, EntityFramework6.Npgsql" xdt:Transform="Insert" />
<providers>
<provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, EntityFramework6.Npgsql" xdt:Transform="InsertIfMissing" xdt:Locator="Match(invariantName)" />
</providers>
</entityFramework>
</configuration>
11 changes: 11 additions & 0 deletions EF6.PG/content/App.config.transform
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<system.data>
<DbProviderFactories>
<remove invariant="Npgsql" />
<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" />
</DbProviderFactories>
</system.data>
</configuration>
9 changes: 9 additions & 0 deletions EF6.PG/content/Web.config.install.xdt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<entityFramework>
<defaultConnectionFactory xdt:Transform="Remove" />
<defaultConnectionFactory type="Npgsql.NpgsqlConnectionFactory, EntityFramework6.Npgsql" xdt:Transform="Insert" />
<providers>
<provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, EntityFramework6.Npgsql" xdt:Transform="InsertIfMissing" xdt:Locator="Match(invariantName)" />
</providers>
</entityFramework>
</configuration>
11 changes: 11 additions & 0 deletions EF6.PG/content/Web.config.transform
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<system.data>
<DbProviderFactories>
<remove invariant="Npgsql" />
<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" />
</DbProviderFactories>
</system.data>
</configuration>
Binary file added EF6.PG/postgresql.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 4 additions & 6 deletions EntityFramework6.Npgsql.sln
Original file line number Diff line number Diff line change
@@ -5,16 +5,14 @@ VisualStudioVersion = 15.0.27703.2035
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4A5A60DD-41B6-40BF-B677-227A921ECCC8}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Npgsql.snk = Npgsql.snk
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8537E50E-CF7F-49CB-B4EF-3E2A1B11F050}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EF6.PG", "EF6.PG\EF6.PG.csproj", "{3EC85CBA-5B79-11E3-8104-0022198AB089}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{ED612DB1-AB32-4603-95E7-891BACA71C39}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFramework6.Npgsql", "src\EntityFramework6.Npgsql\EntityFramework6.Npgsql.csproj", "{3EC85CBA-5B79-11E3-8104-0022198AB089}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFramework6.Npgsql.Tests", "test\EntityFramework6.Npgsql.Tests\EntityFramework6.Npgsql.Tests.csproj", "{4A0A42DE-C8B8-11E4-8EC9-005056A163A4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EF6.PG.Tests", "EF6.PG.Tests\EF6.PG.Tests.csproj", "{4A0A42DE-C8B8-11E4-8EC9-005056A163A4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
116 changes: 0 additions & 116 deletions doc/index.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/toc.md

This file was deleted.

3 changes: 0 additions & 3 deletions src/EntityFramework6.Npgsql/install.ps1

This file was deleted.

This file was deleted.

0 comments on commit 36a9608

Please sign in to comment.