code first with dotconnect for postgres

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
bacemDev
Posts: 1
Joined: Mon 07 Oct 2013 10:46

code first with dotconnect for postgres

Post by bacemDev » Mon 07 Oct 2013 10:51

In my C# Application, I am using code first to generate Postgres Database. SO, I dowloaded Devart DotConnect for postgress and i added devart.data.Postgres, devart.data and devart.data.Postgres.entity dlls to my references. Then, I added those lines in my app.config

Code: Select all

<connectionStrings>
        <add name="SchoolDBConnectionString" connectionString="Server=localhost;Port = 5432;Database=MyDataBase;user Id=postgres;password=*****" providerName="Devart.Data.PostgreSql" />
    </connectionStrings>
<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= 6.8.333.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </DbProviderFactories>
  </system.data>
</configuration>
When I execute my code I have this error

An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct

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

Re: code first with dotconnect for postgres

Post by Shalex » Tue 08 Oct 2013 10:14

Please post here the full call stack with the inner exception.

Post Reply