Entity Framework Power Tools Beta 4 and Postgresql 9.3

Entity Framework Power Tools Beta 4 and Postgresql 9.3

Postby tryhp3 » Thu 12 Dec 2013 19:40

I use http://visualstudiogallery.msdn.microsoft.com/72a60b14-1581-4b9b-89f2-846072eff19d

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?
tryhp3
 
Posts: 2
Joined: Thu 12 Dec 2013 19:35

Re: Entity Framework Power Tools Beta 4 and Postgresql 9.3

Postby 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/postgresql/editions.html.

Please specify the exact version (x.x.x.x) and edition of your dotConnect for PostgreSQL.
Shalex
Devart Team
 
Posts: 7659
Joined: Thu 14 Aug 2008 12:44

Re: Entity Framework Power Tools Beta 4 and Postgresql 9.3

Postby tryhp3 » Tue 17 Dec 2013 17:11

Ok. I use Express version.
tryhp3
 
Posts: 2
Joined: Thu 12 Dec 2013 19:35

Re: Entity Framework Power Tools Beta 4 and Postgresql 9.3

Postby ACARVALHO » Tue 25 Feb 2014 20:55

I use Professional edition Trial.

What is wrong?
ACARVALHO
 
Posts: 6
Joined: Tue 25 Feb 2014 20:53

Re: Entity Framework Power Tools Beta 4 and Postgresql 9.3

Postby 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
Shalex
Devart Team
 
Posts: 7659
Joined: Thu 14 Aug 2008 12:44

Re: Entity Framework Power Tools Beta 4 and Postgresql 9.3

Postby 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_1o79ncjI4UjBJYTNIeHM/edit?usp=sharing
ACARVALHO
 
Posts: 6
Joined: Tue 25 Feb 2014 20:53

Re: Entity Framework Power Tools Beta 4 and Postgresql 9.3

Postby 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-6-support-for-oracle-mysql-postgresql-sqlite-and-salesforce.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/first-look-at-beta-of-ef-6-1-designer/): run Entity Data Model Wizard > Code First from database, choose dotConnect for PostgreSQL and go through the wizard.
Shalex
Devart Team
 
Posts: 7659
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL