Skip to content

Commit f7e238c

Browse files
committed
Merge branch 'hotfix/3.2.1'
2 parents e7bdde8 + 6aac2ee commit f7e238c

31 files changed

+209
-666
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.sln.docstates
66
*.userprefs
77
/*.nupkg
8+
.idea/
89
.nuget/
910
[Bb]in/
1011
[Bb]uild/

.teamcity/EntityFramework6Npgsql/buildTypes/EntityFramework6Npgsql_Build.xml

-137
This file was deleted.

.teamcity/EntityFramework6Npgsql/pluginData/plugin-settings.xml

-5
This file was deleted.

.teamcity/EntityFramework6Npgsql/project-config.xml

-10
This file was deleted.

.teamcity/EntityFramework6Npgsql/vcsRoots/EntityFramework6Npgsql_Github.xml

-19
This file was deleted.

Directory.Build.props

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
3+
<!-- Reference .NET Framework reference assemblies, allows building on environments without .NET Framework installed
4+
(e.g. Linux). Gets ignored on non-framework TFMs. -->
5+
<ItemGroup>
6+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.1" PrivateAssets="All" />
7+
</ItemGroup>
8+
9+
</Project>

EntityFramework6.Npgsql.sln.DotSettings

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
5959
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
6060
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
61+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
6162
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
6263
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
6364
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>

doc/index.md

+24
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,30 @@ title: Entity Framework 6
66
Npgsql has an Entity Framework 6 provider. You can use it by installing the
77
[EntityFramework6.Npgsql](https://www.nuget.org/packages/EntityFramework6.Npgsql/) nuget.
88

9+
## Basic Configuration ##
10+
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:
11+
12+
```csharp
13+
using Npgsql;
14+
using System.Data.Entity;
15+
16+
class NpgSqlConfiguration : DbConfiguration
17+
{
18+
public NpgSqlConfiguration()
19+
{
20+
var name = "Npgsql";
21+
22+
SetProviderFactory(providerInvariantName: name,
23+
providerFactory: NpgsqlFactory.Instance);
24+
25+
SetProviderServices(providerInvariantName: name,
26+
provider: NpgsqlServices.Instance);
27+
28+
SetDefaultConnectionFactory(connectionFactory: new NpgsqlConnectionFactory());
29+
}
30+
}
31+
```
32+
933
## Guid Support ##
1034

1135
Npgsql EF migrations support uses `uuid_generate_v4()` function to generate guids.

src/EntityFramework6.Npgsql/EntityFramework6.Npgsql.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<PropertyGroup>
33
<Description>PostgreSQL provider for Entity Framework 6</Description>
44
<Authors>Shay Rojansky;Emil Lenngren;Francisco Figueiredo Jr.;Kenji Uno</Authors>
5-
<Copyright>Copyright 2018 © The Npgsql Development Team</Copyright>
5+
<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.0</VersionPrefix>
8+
<VersionPrefix>3.2.1</VersionPrefix>
99
<LangVersion>latest</LangVersion>
1010
<TargetFramework>net45</TargetFramework>
1111
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -18,7 +18,7 @@
1818
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
1919
<PackageProjectUrl>http://www.npgsql.org</PackageProjectUrl>
2020
<PackageIconUrl>http://www.npgsql.org/img/postgresql.gif</PackageIconUrl>
21-
<PackageLicenseUrl>https://raw.githubusercontent.com/npgsql/npgsql/master/LICENSE.txt</PackageLicenseUrl>
21+
<PackageLicenseExpression>PostgreSQL</PackageLicenseExpression>
2222
<RepositoryType>git</RepositoryType>
2323
<RepositoryUrl>git://github.com/npgsql/EntityFramework6.Npgsql</RepositoryUrl>
2424
<Deterministic>true</Deterministic>
@@ -39,7 +39,7 @@
3939
<Reference Include="System.ComponentModel.DataAnnotations" />
4040
</ItemGroup>
4141
<ItemGroup>
42-
<PackageReference Include="Npgsql" Version="4.0.2" />
42+
<PackageReference Include="Npgsql" Version="4.0.7" />
4343
<PackageReference Include="EntityFramework" Version="6.2.0" />
4444
</ItemGroup>
4545
</Project>

src/EntityFramework6.Npgsql/NpgsqlConnectionFactory.cs

+1-24
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,4 @@
1-
#region License
2-
// The PostgreSQL License
3-
//
4-
// Copyright (C) 2016 The Npgsql Development Team
5-
//
6-
// Permission to use, copy, modify, and distribute this software and its
7-
// documentation for any purpose, without fee, and without a written
8-
// agreement is hereby granted, provided that the above copyright notice
9-
// and this paragraph and the following two paragraphs appear in all copies.
10-
//
11-
// IN NO EVENT SHALL THE NPGSQL DEVELOPMENT TEAM BE LIABLE TO ANY PARTY
12-
// FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
13-
// INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
14-
// DOCUMENTATION, EVEN IF THE NPGSQL DEVELOPMENT TEAM HAS BEEN ADVISED OF
15-
// THE POSSIBILITY OF SUCH DAMAGE.
16-
//
17-
// THE NPGSQL DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES,
18-
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
19-
// AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
20-
// ON AN "AS IS" BASIS, AND THE NPGSQL DEVELOPMENT TEAM HAS NO OBLIGATIONS
21-
// TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
22-
#endregion
23-
24-
using System.Data.Common;
1+
using System.Data.Common;
252
using System.Data.Entity.Infrastructure;
263

274
namespace Npgsql

src/EntityFramework6.Npgsql/NpgsqlMigrationSqlGenerator.cs

+2-25
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,4 @@
1-
#region License
2-
// The PostgreSQL License
3-
//
4-
// Copyright (C) 2016 The Npgsql Development Team
5-
//
6-
// Permission to use, copy, modify, and distribute this software and its
7-
// documentation for any purpose, without fee, and without a written
8-
// agreement is hereby granted, provided that the above copyright notice
9-
// and this paragraph and the following two paragraphs appear in all copies.
10-
//
11-
// IN NO EVENT SHALL THE NPGSQL DEVELOPMENT TEAM BE LIABLE TO ANY PARTY
12-
// FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
13-
// INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
14-
// DOCUMENTATION, EVEN IF THE NPGSQL DEVELOPMENT TEAM HAS BEEN ADVISED OF
15-
// THE POSSIBILITY OF SUCH DAMAGE.
16-
//
17-
// THE NPGSQL DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES,
18-
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
19-
// AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
20-
// ON AN "AS IS" BASIS, AND THE NPGSQL DEVELOPMENT TEAM HAS NO OBLIGATIONS
21-
// TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
22-
#endregion
23-
24-
using System;
1+
using System;
252
using System.Collections.Generic;
263
using System.Data.Entity.Migrations.Model;
274
using System.Data.Entity.Migrations.Sql;
@@ -436,7 +413,7 @@ protected virtual void Convert(RenameIndexOperation renameIndexOperation)
436413
string GetSchemaNameFromFullTableName(string tableFullName)
437414
{
438415
var dotIndex = tableFullName.IndexOf('.');
439-
return dotIndex != -1 ? tableFullName.Remove(dotIndex) : "dto";
416+
return dotIndex != -1 ? tableFullName.Remove(dotIndex) : "dto";
440417
//TODO: Check always setting dto schema if no schema in table name is not bug
441418
}
442419

src/EntityFramework6.Npgsql/NpgsqlProviderManifest.cs

+1-24
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,4 @@
1-
#region License
2-
// The PostgreSQL License
3-
//
4-
// Copyright (C) 2016 The Npgsql Development Team
5-
//
6-
// Permission to use, copy, modify, and distribute this software and its
7-
// documentation for any purpose, without fee, and without a written
8-
// agreement is hereby granted, provided that the above copyright notice
9-
// and this paragraph and the following two paragraphs appear in all copies.
10-
//
11-
// IN NO EVENT SHALL THE NPGSQL DEVELOPMENT TEAM BE LIABLE TO ANY PARTY
12-
// FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
13-
// INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
14-
// DOCUMENTATION, EVEN IF THE NPGSQL DEVELOPMENT TEAM HAS BEEN ADVISED OF
15-
// THE POSSIBILITY OF SUCH DAMAGE.
16-
//
17-
// THE NPGSQL DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES,
18-
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
19-
// AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
20-
// ON AN "AS IS" BASIS, AND THE NPGSQL DEVELOPMENT TEAM HAS NO OBLIGATIONS
21-
// TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
22-
#endregion
23-
24-
using System;
1+
using System;
252
using System.Collections.Generic;
263
using System.Data.Entity;
274
using System.Data.Entity.Core.Common;

0 commit comments

Comments
 (0)