Entity Framework Power Tools Beta 4 and Postgresql 9.3

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
tryhp3
Posts: 2
Joined: Thu 12 Dec 2013 19:35

Entity Framework Power Tools Beta 4 and Postgresql 9.3

Post by tryhp3 » Thu 12 Dec 2013 19:40

I use http://visualstudiogallery.msdn.microso ... 6072eff19d

Reverse Engineer Code First throw:

Code: Select all

System.Data.ProviderIncompatibleException: A null was returned after calling the 'GetService' method on a store provider instance of type 'Devart.Data.PostgreSql.PgSqlProviderFactory'. The store provider might not be functioning correctly.
   at System.Data.Entity.Design.Common.MetadataUtil.GetProviderServices(DbProviderFactory factory)
   at System.Data.Entity.Design.EntityStoreSchemaGenerator.CreateStoreSchemaConnection(String providerInvariantName, String connectionString, Version targetEntityFrameworkVersion)
   at System.Data.Entity.Design.SsdlGenerator.EntityStoreSchemaGeneratorDatabaseSchemaLoader.CreateStoreSchemaConnection(String providerInvariantName, String connectionString, Version& storeSchemaModelVersion)
   at System.Data.Entity.Design.EntityStoreSchemaGenerator..ctor(String providerInvariantName, String connectionString, String namespaceName)
   at Microsoft.DbContextPackage.Handlers.ReverseEngineerCodeFirstHandler.ReverseEngineerCodeFirst(Project project)
What is wrong?

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: Entity Framework Power Tools Beta 4 and Postgresql 9.3

Post by Shalex » Mon 16 Dec 2013 14:34

The Entity Framework support is available only in the Professional edition of dotConnect for PostgreSQL: http://www.devart.com/dotconnect/postgr ... tions.html.

Please specify the exact version (x.x.x.x) and edition of your dotConnect for PostgreSQL.

tryhp3
Posts: 2
Joined: Thu 12 Dec 2013 19:35

Re: Entity Framework Power Tools Beta 4 and Postgresql 9.3

Post by tryhp3 » Tue 17 Dec 2013 17:11

Ok. I use Express version.

ACARVALHO
Posts: 6
Joined: Tue 25 Feb 2014 20:53

Re: Entity Framework Power Tools Beta 4 and Postgresql 9.3

Post by ACARVALHO » Tue 25 Feb 2014 20:55

I use Professional edition Trial.

What is wrong?

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: Entity Framework Power Tools Beta 4 and Postgresql 9.3

Post by Shalex » Thu 27 Feb 2014 16:27

@ACARVALHO
Please specify the following information:
1) the exact versions of your Visual Studio and Entity Framework Power Tools
2) the build number (x.x.x.x) of your dotConnect for PostgreSQL
3) the steps we should follow to reproduce the issue in our environment

ACARVALHO
Posts: 6
Joined: Tue 25 Feb 2014 20:53

Re: Entity Framework Power Tools Beta 4 and Postgresql 9.3

Post by ACARVALHO » Wed 19 Mar 2014 13:45

1) the exact versions of your Visual Studio and Entity Framework Power Tools
- Visual Studio 2013 RTM
- Entity Framework Power Tools Beta 4
2) the build number (x.x.x.x) of your dotConnect for PostgreSQL
- 7.2.103
3) the steps we should follow to reproduce the issue in our environment
- Right-clicking on a C# project in VS > Entity Framework > Reverse Engineer Code First

error returned:
Unable to find the requested .Net Framework Data Provider. It may not be installed
image error: https://drive.google.com/file/d/0B5_Z5G ... sp=sharing

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: Entity Framework Power Tools Beta 4 and Postgresql 9.3

Post by Shalex » Mon 24 Mar 2014 13:55

Please upgrade Entity Framework Power Tools to the latest (6.1) version and perform these steps:

1) add registration of EF6 provider in app.config as it is described at http://blog.devart.com/entity-framework ... force.html:

Code: Select all

  <entityFramework>
    <providers>
      <provider invariantName="Devart.Data.PostgreSql" type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity, Version=7.3.115.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </providers>
  </entityFramework>
  <system.data>
    <DbProviderFactories>
      <remove invariant="Devart.Data.PostgreSql" />
      <add name="dotConnect for PostgreSQL" invariant="Devart.Data.PostgreSql" description="Devart dotConnect for PostgreSQL" type="Devart.Data.PostgreSql.PgSqlProviderFactory, Devart.Data.PostgreSql, Version=7.3.115.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </DbProviderFactories>
  </system.data>
Replace 7.3.115 here with your actual version (but leave the current revision numbers: *.6 and *.0).

2) right click on the project in Solution Explorer > Manage NuGet Packages > Microsoft and .NET > find EntityFramework (version 6.1.0) and install it

3) rebuild the project

4) the interface in EF Tools 6.1 is changed (http://thedatafarm.com/data-access/firs ... -designer/): run Entity Data Model Wizard > Code First from database, choose dotConnect for PostgreSQL and go through the wizard.

Post Reply