File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 <PrivateAssets >all</PrivateAssets >
1414 <IncludeAssets >runtime; build; native; contentfiles; analyzers</IncludeAssets >
1515 </PackageReference >
16+ <PackageReference Include =" Npgsql" Version =" 4.0.3" />
1617 <PackageReference Include =" System.Data.SqlClient" Version =" 4.5.1" />
1718 <PackageReference Include =" System.Data.SQLite.Core.MSIL" Version =" 1.0.109" />
1819 </ItemGroup >
Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Data ;
4+ using System . Text ;
5+
6+ using Npgsql ;
7+
8+ namespace DirectSQL . Npgsql
9+ {
10+ public class NpgsqlDatabase : Database
11+ {
12+
13+ private String _npgsqlConnectionString ;
14+
15+ public NpgsqlDatabase ( String npgsqlConnectionString )
16+ {
17+ _npgsqlConnectionString = npgsqlConnectionString ;
18+ }
19+
20+ protected override IDbConnection CreateConnection ( )
21+ {
22+ return new NpgsqlConnection ( _npgsqlConnectionString ) ;
23+ }
24+
25+
26+ public static NpgsqlParameter CreateSQLiteParameter ( string name , object value )
27+ {
28+ return new NpgsqlParameter ( name , value ) ;
29+ }
30+
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments