Skip to content

Commit

Permalink
Merge branch 'hotfix/3.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed May 21, 2019
2 parents e7bdde8 + 6aac2ee commit f7e238c
Show file tree
Hide file tree
Showing 31 changed files with 209 additions and 666 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.sln.docstates
*.userprefs
/*.nupkg
.idea/
.nuget/
[Bb]in/
[Bb]uild/
Expand Down

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions .teamcity/EntityFramework6Npgsql/project-config.xml

This file was deleted.

This file was deleted.

9 changes: 9 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>

<!-- 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" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions EntityFramework6.Npgsql.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
Expand Down
24 changes: 24 additions & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@ 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.
Expand Down
8 changes: 4 additions & 4 deletions src/EntityFramework6.Npgsql/EntityFramework6.Npgsql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<PropertyGroup>
<Description>PostgreSQL provider for Entity Framework 6</Description>
<Authors>Shay Rojansky;Emil Lenngren;Francisco Figueiredo Jr.;Kenji Uno</Authors>
<Copyright>Copyright 2018 © The Npgsql Development Team</Copyright>
<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.0</VersionPrefix>
<VersionPrefix>3.2.1</VersionPrefix>
<LangVersion>latest</LangVersion>
<TargetFramework>net45</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand All @@ -18,7 +18,7 @@
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<PackageProjectUrl>http://www.npgsql.org</PackageProjectUrl>
<PackageIconUrl>http://www.npgsql.org/img/postgresql.gif</PackageIconUrl>
<PackageLicenseUrl>https://raw.githubusercontent.com/npgsql/npgsql/master/LICENSE.txt</PackageLicenseUrl>
<PackageLicenseExpression>PostgreSQL</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>git://github.com/npgsql/EntityFramework6.Npgsql</RepositoryUrl>
<Deterministic>true</Deterministic>
Expand All @@ -39,7 +39,7 @@
<Reference Include="System.ComponentModel.DataAnnotations" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Npgsql" Version="4.0.2" />
<PackageReference Include="Npgsql" Version="4.0.7" />
<PackageReference Include="EntityFramework" Version="6.2.0" />
</ItemGroup>
</Project>
25 changes: 1 addition & 24 deletions src/EntityFramework6.Npgsql/NpgsqlConnectionFactory.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,4 @@
#region License
// The PostgreSQL License
//
// Copyright (C) 2016 The Npgsql Development Team
//
// Permission to use, copy, modify, and distribute this software and its
// documentation for any purpose, without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// and this paragraph and the following two paragraphs appear in all copies.
//
// IN NO EVENT SHALL THE NPGSQL DEVELOPMENT TEAM BE LIABLE TO ANY PARTY
// FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
// INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
// DOCUMENTATION, EVEN IF THE NPGSQL DEVELOPMENT TEAM HAS BEEN ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
//
// THE NPGSQL DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
// ON AN "AS IS" BASIS, AND THE NPGSQL DEVELOPMENT TEAM HAS NO OBLIGATIONS
// TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#endregion

using System.Data.Common;
using System.Data.Common;
using System.Data.Entity.Infrastructure;

namespace Npgsql
Expand Down
27 changes: 2 additions & 25 deletions src/EntityFramework6.Npgsql/NpgsqlMigrationSqlGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,4 @@
#region License
// The PostgreSQL License
//
// Copyright (C) 2016 The Npgsql Development Team
//
// Permission to use, copy, modify, and distribute this software and its
// documentation for any purpose, without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// and this paragraph and the following two paragraphs appear in all copies.
//
// IN NO EVENT SHALL THE NPGSQL DEVELOPMENT TEAM BE LIABLE TO ANY PARTY
// FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
// INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
// DOCUMENTATION, EVEN IF THE NPGSQL DEVELOPMENT TEAM HAS BEEN ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
//
// THE NPGSQL DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
// ON AN "AS IS" BASIS, AND THE NPGSQL DEVELOPMENT TEAM HAS NO OBLIGATIONS
// TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#endregion

using System;
using System;
using System.Collections.Generic;
using System.Data.Entity.Migrations.Model;
using System.Data.Entity.Migrations.Sql;
Expand Down Expand Up @@ -436,7 +413,7 @@ protected virtual void Convert(RenameIndexOperation renameIndexOperation)
string GetSchemaNameFromFullTableName(string tableFullName)
{
var dotIndex = tableFullName.IndexOf('.');
return dotIndex != -1 ? tableFullName.Remove(dotIndex) : "dto";
return dotIndex != -1 ? tableFullName.Remove(dotIndex) : "dto";
//TODO: Check always setting dto schema if no schema in table name is not bug
}

Expand Down
25 changes: 1 addition & 24 deletions src/EntityFramework6.Npgsql/NpgsqlProviderManifest.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,4 @@
#region License
// The PostgreSQL License
//
// Copyright (C) 2016 The Npgsql Development Team
//
// Permission to use, copy, modify, and distribute this software and its
// documentation for any purpose, without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// and this paragraph and the following two paragraphs appear in all copies.
//
// IN NO EVENT SHALL THE NPGSQL DEVELOPMENT TEAM BE LIABLE TO ANY PARTY
// FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
// INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
// DOCUMENTATION, EVEN IF THE NPGSQL DEVELOPMENT TEAM HAS BEEN ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
//
// THE NPGSQL DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
// ON AN "AS IS" BASIS, AND THE NPGSQL DEVELOPMENT TEAM HAS NO OBLIGATIONS
// TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#endregion

using System;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Core.Common;
Expand Down
Loading

0 comments on commit f7e238c

Please sign in to comment.