Error Creating DB-Context

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Posts: 2
Joined: Sat 28 Dec 2013 23:41

Error Creating DB-Context

Post by snmigerl » Sat 28 Dec 2013 23:46

I tried to get COdeFirst Approach Working with dotconnect but I allways get the following error:
{"The 'Instance' member of the Entity Framework provider type 'Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity, Version=, Culture=neutral, PublicKeyToken=09af7300eec23701' did not return an object that inherits from 'System.Data.Entity.Core.Common.DbProviderServices'. Entity Framework providers must inherit from this class and the 'Instance' member must return the singleton instance of the provider. This may be because the provider does not support Entity Framework 6 or later; see for more information."}
Even the provided Smaple doesn't work...

Any hints for me?

I'm very interested in using an purchasing dotconnect pro, but getting Code First working is THE Feature I Need...



Site Admin
Posts: 8246
Joined: Thu 14 Aug 2008 12:44

Re: Error Creating DB-Context

Post by Shalex » Mon 30 Dec 2013 10:22

It seems like your *.config file includes "Devart.Data.PostgreSql.Entity, Version=" instead of "Devart.Data.PostgreSql.Entity, Version=".

Here is a full ADO.NET and EF6 configuration entry for dotConnect for PostgreSQL v7.2.55 in *.config:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
    <!-- For more information on Entity Framework configuration, visit -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
      <provider invariantName="Devart.Data.PostgreSql" type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity, Version=, Culture=neutral, PublicKeyToken=09af7300eec23701" />
      <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=, Culture=neutral, PublicKeyToken=09af7300eec23701" />

Post Reply