Postgres SQL Support

Oct 10, 2012 at 10:48 AM
Edited Oct 10, 2012 at 10:49 AM

Trying to use Fluent Data with a Postgres DB

 

Keep getting : 

 

"Unable to find the requested .Net Framework Data Provider.  It may not be installed."

 

Even though I have NPGSql installed.

 

Have tested NPGSql using "other ORM's (Simple.Data & ORMLite) both work, and find the installed postgres ADO.Net driver without issue, only fluent data does not?

 

Any Ideas?

 

Platform: Win7 Ent X64

IDE: VS2010 Ult

Project Type: .NET 4 Full libs , Winforms App

 

Test code:

 

const string connStr = "Server=1.1.1.1;Port=5432;Database=dbname;User Id=user;Password=pass;";

public IDbContext Context()

{

  return new DbContext().ConnectionString(connStr, DbProviderTypes.PostgreSql);

}

List<dynamic> points = Context().Sql("select * from pointstest").Query();


Project Refs:
FluentData - v2.3.0.0 (Runtime - 4.0.30319)
NpgSql - v2.0.11.0 (Runtime - 4.0.30319)
Plus all the usual winforms stuff...

Cheers
Shawty

Oct 23, 2012 at 8:44 AM

you have to add the following in your web.config or app.config

<system.data>
  <DbProviderFactories>
    <add name="Npgsql Data Provider"
         invariant="Npgsql"
         support="FF"
         description=".Net Framework Data Provider for Postgresql Server"
         type="Npgsql.NpgsqlFactory, Npgsql" />
  </DbProviderFactories>
</system.data>