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!
Using dotConnect with F#
Re: Using dotConnect with F#
You can employ a plain ADO.NET using dotConnect for PostgreSQL with F#:
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.
Code: Select all
open Devart.Data.PostgreSql
let conn = new PgSqlConnection("server=db;port=5441;uid=postgres;pwd=postgres;database=postgres;")
conn.Open()
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.