diff --git a/Directory.Build.props b/Directory.Build.props
index f1d9f98..c164035 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,9 +1,14 @@
+
+ true
+ snupkg
+
+
-
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
new file mode 100644
index 0000000..37c0136
--- /dev/null
+++ b/Directory.Build.targets
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/EntityFramework6.Npgsql.Tests/App.config b/EF6.PG.Tests/App.config
similarity index 95%
rename from test/EntityFramework6.Npgsql.Tests/App.config
rename to EF6.PG.Tests/App.config
index 3bd6d0b..f113db7 100644
--- a/test/EntityFramework6.Npgsql.Tests/App.config
+++ b/EF6.PG.Tests/App.config
@@ -29,7 +29,7 @@
-
+
diff --git a/EF6.PG.Tests/EF6.PG.Tests.csproj b/EF6.PG.Tests/EF6.PG.Tests.csproj
new file mode 100644
index 0000000..e2a05da
--- /dev/null
+++ b/EF6.PG.Tests/EF6.PG.Tests.csproj
@@ -0,0 +1,19 @@
+
+
+ latest
+ net45;netcoreapp3.0
+ EntityFramework6.Npgsql.Tests
+ EntityFramework6.Npgsql.Tests
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/EntityFramework6.Npgsql.Tests/EntityFrameworkBasicTests.cs b/EF6.PG.Tests/EntityFrameworkBasicTests.cs
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/EntityFrameworkBasicTests.cs
rename to EF6.PG.Tests/EntityFrameworkBasicTests.cs
diff --git a/test/EntityFramework6.Npgsql.Tests/EntityFrameworkMigrationTests.cs b/EF6.PG.Tests/EntityFrameworkMigrationTests.cs
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/EntityFrameworkMigrationTests.cs
rename to EF6.PG.Tests/EntityFrameworkMigrationTests.cs
diff --git a/test/EntityFramework6.Npgsql.Tests/FullTextSearchTests.cs b/EF6.PG.Tests/FullTextSearchTests.cs
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/FullTextSearchTests.cs
rename to EF6.PG.Tests/FullTextSearchTests.cs
diff --git a/test/EntityFramework6.Npgsql.Tests/NLogLoggingProvider.cs b/EF6.PG.Tests/NLogLoggingProvider.cs
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/NLogLoggingProvider.cs
rename to EF6.PG.Tests/NLogLoggingProvider.cs
diff --git a/test/EntityFramework6.Npgsql.Tests/PatternMatchingTests.cs b/EF6.PG.Tests/PatternMatchingTests.cs
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/PatternMatchingTests.cs
rename to EF6.PG.Tests/PatternMatchingTests.cs
diff --git a/test/EntityFramework6.Npgsql.Tests/Spatial/PostgisServiceTests.cs b/EF6.PG.Tests/Spatial/PostgisServiceTests.cs
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/Spatial/PostgisServiceTests.cs
rename to EF6.PG.Tests/Spatial/PostgisServiceTests.cs
diff --git a/EF6.PG.Tests/Support/AssemblySetup.cs b/EF6.PG.Tests/Support/AssemblySetup.cs
new file mode 100644
index 0000000..e503497
--- /dev/null
+++ b/EF6.PG.Tests/Support/AssemblySetup.cs
@@ -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());
+ }
+}
diff --git a/test/EntityFramework6.Npgsql.Tests/Support/CodeAnnotations.cs b/EF6.PG.Tests/Support/CodeAnnotations.cs
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/Support/CodeAnnotations.cs
rename to EF6.PG.Tests/Support/CodeAnnotations.cs
diff --git a/test/EntityFramework6.Npgsql.Tests/Support/EntityFrameworkTestBase.cs b/EF6.PG.Tests/Support/EntityFrameworkTestBase.cs
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/Support/EntityFrameworkTestBase.cs
rename to EF6.PG.Tests/Support/EntityFrameworkTestBase.cs
diff --git a/test/EntityFramework6.Npgsql.Tests/Support/TestBase.cs b/EF6.PG.Tests/Support/TestBase.cs
similarity index 75%
rename from test/EntityFramework6.Npgsql.Tests/Support/TestBase.cs
rename to EF6.PG.Tests/Support/TestBase.cs
index 0ccad6d..cf23265 100644
--- a/test/EntityFramework6.Npgsql.Tests/Support/TestBase.cs
+++ b/EF6.PG.Tests/Support/TestBase.cs
@@ -23,8 +23,6 @@ public abstract class TestBase
string _connectionString;
- static bool _loggingSetUp;
-
///
/// 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
diff --git a/EF6.PG.Tests/Support/TestDbConfiguration.cs b/EF6.PG.Tests/Support/TestDbConfiguration.cs
new file mode 100644
index 0000000..2276bed
--- /dev/null
+++ b/EF6.PG.Tests/Support/TestDbConfiguration.cs
@@ -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);
+ }
+ }
+}
diff --git a/test/EntityFramework6.Npgsql.Tests/Support/TestUtil.cs b/EF6.PG.Tests/Support/TestUtil.cs
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/Support/TestUtil.cs
rename to EF6.PG.Tests/Support/TestUtil.cs
diff --git a/test/EntityFramework6.Npgsql.Tests/xmlModel/XmlTest.ObjectLayer.EF6.cs b/EF6.PG.Tests/xmlModel/XmlTest.ObjectLayer.EF6.cs
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/xmlModel/XmlTest.ObjectLayer.EF6.cs
rename to EF6.PG.Tests/xmlModel/XmlTest.ObjectLayer.EF6.cs
diff --git a/test/EntityFramework6.Npgsql.Tests/xmlModel/XmlTest.ObjectLayer.cs b/EF6.PG.Tests/xmlModel/XmlTest.ObjectLayer.cs
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/xmlModel/XmlTest.ObjectLayer.cs
rename to EF6.PG.Tests/xmlModel/XmlTest.ObjectLayer.cs
diff --git a/test/EntityFramework6.Npgsql.Tests/xmlModel/XmlTest.csdl b/EF6.PG.Tests/xmlModel/XmlTest.csdl
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/xmlModel/XmlTest.csdl
rename to EF6.PG.Tests/xmlModel/XmlTest.csdl
diff --git a/test/EntityFramework6.Npgsql.Tests/xmlModel/XmlTest.msl b/EF6.PG.Tests/xmlModel/XmlTest.msl
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/xmlModel/XmlTest.msl
rename to EF6.PG.Tests/xmlModel/XmlTest.msl
diff --git a/test/EntityFramework6.Npgsql.Tests/xmlModel/XmlTest.ssdl b/EF6.PG.Tests/xmlModel/XmlTest.ssdl
similarity index 100%
rename from test/EntityFramework6.Npgsql.Tests/xmlModel/XmlTest.ssdl
rename to EF6.PG.Tests/xmlModel/XmlTest.ssdl
diff --git a/src/EntityFramework6.Npgsql/App.config b/EF6.PG/App.config
similarity index 100%
rename from src/EntityFramework6.Npgsql/App.config
rename to EF6.PG/App.config
diff --git a/src/EntityFramework6.Npgsql/EntityFramework6.Npgsql.csproj b/EF6.PG/EF6.PG.csproj
similarity index 61%
rename from src/EntityFramework6.Npgsql/EntityFramework6.Npgsql.csproj
rename to EF6.PG/EF6.PG.csproj
index a8b1d9a..87cf8ba 100644
--- a/src/EntityFramework6.Npgsql/EntityFramework6.Npgsql.csproj
+++ b/EF6.PG/EF6.PG.csproj
@@ -5,19 +5,20 @@
Copyright 2019 © The Npgsql Development Team
Npgsql
npgsql postgresql postgres data database entity framework ef orm
- 3.2.1.1
+ 6.3.0
latest
- net45
+ net45;netstandard21
true
CS1591
true
Npgsql
+ EntityFramework6.Npgsql
true
- ../../Npgsql.snk
+ ../Npgsql.snk
true
true
- http://www.npgsql.org
- http://www.npgsql.org/img/postgresql.gif
+ https://github.com/npgsql/EntityFramework6.Npgsql
+ postgresql.png
PostgreSQL
git
git://github.com/npgsql/EntityFramework6.Npgsql
@@ -27,9 +28,13 @@
-
+
+
+
+
+
-
+
@@ -39,7 +44,7 @@
-
-
+
+
diff --git a/src/EntityFramework6.Npgsql/NpgsqlConnectionFactory.cs b/EF6.PG/NpgsqlConnectionFactory.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/NpgsqlConnectionFactory.cs
rename to EF6.PG/NpgsqlConnectionFactory.cs
diff --git a/src/EntityFramework6.Npgsql/NpgsqlMigrationSqlGenerator.cs b/EF6.PG/NpgsqlMigrationSqlGenerator.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/NpgsqlMigrationSqlGenerator.cs
rename to EF6.PG/NpgsqlMigrationSqlGenerator.cs
diff --git a/src/EntityFramework6.Npgsql/NpgsqlProviderManifest.cs b/EF6.PG/NpgsqlProviderManifest.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/NpgsqlProviderManifest.cs
rename to EF6.PG/NpgsqlProviderManifest.cs
diff --git a/src/EntityFramework6.Npgsql/NpgsqlRankingNormalization.cs b/EF6.PG/NpgsqlRankingNormalization.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/NpgsqlRankingNormalization.cs
rename to EF6.PG/NpgsqlRankingNormalization.cs
diff --git a/src/EntityFramework6.Npgsql/NpgsqlServices.cs b/EF6.PG/NpgsqlServices.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/NpgsqlServices.cs
rename to EF6.PG/NpgsqlServices.cs
diff --git a/src/EntityFramework6.Npgsql/NpgsqlTextFunctions.cs b/EF6.PG/NpgsqlTextFunctions.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/NpgsqlTextFunctions.cs
rename to EF6.PG/NpgsqlTextFunctions.cs
diff --git a/src/EntityFramework6.Npgsql/NpgsqlTypeFunctions.cs b/EF6.PG/NpgsqlTypeFunctions.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/NpgsqlTypeFunctions.cs
rename to EF6.PG/NpgsqlTypeFunctions.cs
diff --git a/src/EntityFramework6.Npgsql/NpgsqlWeightLabel.cs b/EF6.PG/NpgsqlWeightLabel.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/NpgsqlWeightLabel.cs
rename to EF6.PG/NpgsqlWeightLabel.cs
diff --git a/src/EntityFramework6.Npgsql/Properties/AssemblyInfo.cs b/EF6.PG/Properties/AssemblyInfo.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/Properties/AssemblyInfo.cs
rename to EF6.PG/Properties/AssemblyInfo.cs
diff --git a/src/EntityFramework6.Npgsql/Resources/NpgsqlProviderManifest.Manifest.xml b/EF6.PG/Resources/NpgsqlProviderManifest.Manifest.xml
similarity index 100%
rename from src/EntityFramework6.Npgsql/Resources/NpgsqlProviderManifest.Manifest.xml
rename to EF6.PG/Resources/NpgsqlProviderManifest.Manifest.xml
diff --git a/src/EntityFramework6.Npgsql/Resources/NpgsqlSchema.msl b/EF6.PG/Resources/NpgsqlSchema.msl
similarity index 100%
rename from src/EntityFramework6.Npgsql/Resources/NpgsqlSchema.msl
rename to EF6.PG/Resources/NpgsqlSchema.msl
diff --git a/src/EntityFramework6.Npgsql/Resources/NpgsqlSchema.ssdl b/EF6.PG/Resources/NpgsqlSchema.ssdl
similarity index 100%
rename from src/EntityFramework6.Npgsql/Resources/NpgsqlSchema.ssdl
rename to EF6.PG/Resources/NpgsqlSchema.ssdl
diff --git a/src/EntityFramework6.Npgsql/Resources/NpgsqlSchemaV3.ssdl b/EF6.PG/Resources/NpgsqlSchemaV3.ssdl
similarity index 100%
rename from src/EntityFramework6.Npgsql/Resources/NpgsqlSchemaV3.ssdl
rename to EF6.PG/Resources/NpgsqlSchemaV3.ssdl
diff --git a/src/EntityFramework6.Npgsql/Spatial/PostgisDataReader.cs b/EF6.PG/Spatial/PostgisDataReader.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/Spatial/PostgisDataReader.cs
rename to EF6.PG/Spatial/PostgisDataReader.cs
diff --git a/src/EntityFramework6.Npgsql/Spatial/PostgisServices.cs b/EF6.PG/Spatial/PostgisServices.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/Spatial/PostgisServices.cs
rename to EF6.PG/Spatial/PostgisServices.cs
diff --git a/src/EntityFramework6.Npgsql/SqlGenerators/PendingProjectsNode.cs b/EF6.PG/SqlGenerators/PendingProjectsNode.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/SqlGenerators/PendingProjectsNode.cs
rename to EF6.PG/SqlGenerators/PendingProjectsNode.cs
diff --git a/src/EntityFramework6.Npgsql/SqlGenerators/SqlBaseGenerator.cs b/EF6.PG/SqlGenerators/SqlBaseGenerator.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/SqlGenerators/SqlBaseGenerator.cs
rename to EF6.PG/SqlGenerators/SqlBaseGenerator.cs
diff --git a/src/EntityFramework6.Npgsql/SqlGenerators/SqlDeleteGenerator.cs b/EF6.PG/SqlGenerators/SqlDeleteGenerator.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/SqlGenerators/SqlDeleteGenerator.cs
rename to EF6.PG/SqlGenerators/SqlDeleteGenerator.cs
diff --git a/src/EntityFramework6.Npgsql/SqlGenerators/SqlInsertGenerator.cs b/EF6.PG/SqlGenerators/SqlInsertGenerator.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/SqlGenerators/SqlInsertGenerator.cs
rename to EF6.PG/SqlGenerators/SqlInsertGenerator.cs
diff --git a/src/EntityFramework6.Npgsql/SqlGenerators/SqlSelectGenerator.cs b/EF6.PG/SqlGenerators/SqlSelectGenerator.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/SqlGenerators/SqlSelectGenerator.cs
rename to EF6.PG/SqlGenerators/SqlSelectGenerator.cs
diff --git a/src/EntityFramework6.Npgsql/SqlGenerators/SqlUpdateGenerator.cs b/EF6.PG/SqlGenerators/SqlUpdateGenerator.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/SqlGenerators/SqlUpdateGenerator.cs
rename to EF6.PG/SqlGenerators/SqlUpdateGenerator.cs
diff --git a/src/EntityFramework6.Npgsql/SqlGenerators/StringPair.cs b/EF6.PG/SqlGenerators/StringPair.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/SqlGenerators/StringPair.cs
rename to EF6.PG/SqlGenerators/StringPair.cs
diff --git a/src/EntityFramework6.Npgsql/SqlGenerators/VisitedExpression.cs b/EF6.PG/SqlGenerators/VisitedExpression.cs
similarity index 100%
rename from src/EntityFramework6.Npgsql/SqlGenerators/VisitedExpression.cs
rename to EF6.PG/SqlGenerators/VisitedExpression.cs
diff --git a/EF6.PG/content/App.config.install.xdt b/EF6.PG/content/App.config.install.xdt
new file mode 100644
index 0000000..ace92ed
--- /dev/null
+++ b/EF6.PG/content/App.config.install.xdt
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/EF6.PG/content/App.config.transform b/EF6.PG/content/App.config.transform
new file mode 100644
index 0000000..1dad58e
--- /dev/null
+++ b/EF6.PG/content/App.config.transform
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/EF6.PG/content/Web.config.install.xdt b/EF6.PG/content/Web.config.install.xdt
new file mode 100644
index 0000000..ace92ed
--- /dev/null
+++ b/EF6.PG/content/Web.config.install.xdt
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/EF6.PG/content/Web.config.transform b/EF6.PG/content/Web.config.transform
new file mode 100644
index 0000000..1dad58e
--- /dev/null
+++ b/EF6.PG/content/Web.config.transform
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/EF6.PG/postgresql.png b/EF6.PG/postgresql.png
new file mode 100644
index 0000000..3a21b19
Binary files /dev/null and b/EF6.PG/postgresql.png differ
diff --git a/EntityFramework6.Npgsql.sln b/EntityFramework6.Npgsql.sln
index 54bf88e..2609a94 100644
--- a/EntityFramework6.Npgsql.sln
+++ b/EntityFramework6.Npgsql.sln
@@ -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
diff --git a/doc/index.md b/doc/index.md
deleted file mode 100644
index 1dd3137..0000000
--- a/doc/index.md
+++ /dev/null
@@ -1,116 +0,0 @@
----
-layout: doc
-title: Entity Framework 6
----
-
-Npgsql has an Entity Framework 6 provider. You can use it by installing the
-[EntityFramework6.Npgsql](https://www.nuget.org/packages/EntityFramework6.Npgsql/) nuget.
-
-## Basic Configuration ##
-To use Entity Framework with Npgsql, define a class that inherits from `DbConfiguration` in the same assembly as your class inheriting `DbContext`. Ensure that you configure provider services, a provider factory, a default connection factory as shown below:
-
-```csharp
-using Npgsql;
-using System.Data.Entity;
-
-class NpgSqlConfiguration : DbConfiguration
-{
- public NpgSqlConfiguration()
- {
- var name = "Npgsql";
-
- SetProviderFactory(providerInvariantName: name,
- providerFactory: NpgsqlFactory.Instance);
-
- SetProviderServices(providerInvariantName: name,
- provider: NpgsqlServices.Instance);
-
- SetDefaultConnectionFactory(connectionFactory: new NpgsqlConnectionFactory());
- }
-}
-```
-
-## Guid Support ##
-
-Npgsql EF migrations support uses `uuid_generate_v4()` function to generate guids.
-In order to have access to this function, you have to install the extension uuid-ossp through the following command:
-
-```sql
-create extension "uuid-ossp";
-```
-
-If you don't have this extension installed, when you run Npgsql migrations you will get the following error message:
-
-```
-ERROR: function uuid_generate_v4() does not exist
-```
-
-If the database is being created by Npgsql Migrations, you will need to
-[run the `create extension` command in the `template1` database](http://stackoverflow.com/a/11584751).
-This way, when the new database is created, the extension will be installed already.
-
-## Template Database ##
-
-When the Entity Framework 6 provider creates a database, it issues a simple `CREATE DATABASE` command.
-In PostgreSQL, this implicitly uses `template1` as the template - anything existing in `template1` will
-be copied to your new database. If you wish to change the database used as a template, you can specify
-the `EF Template Database` connection string parameter. For more info see the
-[PostgreSQL docs](https://www.postgresql.org/docs/current/static/sql-createdatabase.html).
-
-## Customizing DataReader Behavior ##
-
-You can use [an Entity Framework 6 IDbCommandInterceptor](https://msdn.microsoft.com/en-us/library/dn469464(v=vs.113).aspx) to wrap the `DataReader` instance returned by Npgsql when Entity Framework executes queries. This is possible using a ```DbConfiguration``` class.
-
-Example use cases:
-- Forcing all returned ```DateTime``` and ```DateTimeOffset``` values to be in the UTC timezone.
-- Preventing accidental insertion of DateTime values having ```DateTimeKind.Unspecified```.
-- Forcing all postgres date/time types to be returned to Entity Framework as ```DateTimeOffset```.
-
-```c#
-[DbConfigurationType(typeof(AppDbContextConfiguration))]
-public class AppDbContext : DbContext
-{
- // ...
-}
-
-public class AppDbContextConfiguration : DbConfiguration
-{
- public AppDbContextConfiguration()
- {
- this.AddInterceptor(new MyEntityFrameworkInterceptor());
- }
-}
-
-class MyEntityFrameworkInterceptor : DbCommandInterceptor
-{
- public override void ReaderExecuted(
- DbCommand command,
- DbCommandInterceptionContext interceptionContext)
- {
- if (interceptionContext.Result == null) return;
- interceptionContext.Result = new WrappingDbDataReader(interceptionContext.Result);
- }
-
- public override void ScalarExecuted(
- DbCommand command,
- DbCommandInterceptionContext