Simple.Data.Npgsql by Chris Hogan,Yaroslav Tatarenko

<PackageReference Include="Simple.Data.Npgsql" Version="0.19.1" />

 PgConnectionProvider

using Npgsql; using Simple.Data.Ado; using Simple.Data.Ado.Schema; using System; using System.ComponentModel.Composition; using System.Data; namespace Simple.Data.Npgsql { [Export(typeof(IConnectionProvider))] [Export("Npgsql", typeof(IConnectionProvider))] public class PgConnectionProvider { public string ConnectionString { get; set; } public bool SupportsCompoundStatements => true; public bool SupportsStoredProcedures => true; public void SetConnectionString(string connectionString) { ConnectionString = connectionString; } public IDbConnection CreateConnection() { return (IDbConnection)new NpgsqlConnection(ConnectionString); } public ISchemaProvider GetSchemaProvider() { return new PgSchemaProvider(this); } public string GetIdentityFunction() { throw new InvalidOperationException("PostgreSql does not have a global identity function"); } public IProcedureExecutor GetProcedureExecutor(AdoAdapter adapter, ObjectName procedureName) { return new PgProcedureExecutor(adapter, procedureName); } } }