Using dotConnect with F#

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Posts: 1
Joined: Fri 18 Oct 2013 17:01

Using dotConnect with F#

Post by siklosg » Fri 18 Oct 2013 17:04

I'm pretty new to .Net and F# but have been using PostgreSQL for a long time.

Can I connect to a PostgreSQL DB from F# using the EF provided by dotConnect? How would I need to configure the type provider for such a connection?

Thanks in advance!

Devart Team
Posts: 7964
Joined: Thu 14 Aug 2008 12:44

Re: Using dotConnect with F#

Post by Shalex » Mon 21 Oct 2013 14:06

You can employ a plain ADO.NET using dotConnect for PostgreSQL with F#:

Code: Select all

open Devart.Data.PostgreSql
let conn = new PgSqlConnection("server=db;port=5441;uid=postgres;pwd=postgres;database=postgres;")
Currently Entity Developer is designed to generate only C# and VB code for Entity Framework models.

As a workaround, create a model and generate the C#/VB code in a separate C#/VB project. Then add a reference to the compiled C#/VB assembly in your F# project and use its types.

Post Reply