More work on this Console Host

This commit is contained in:
Janus Knudsen 2025-02-21 17:03:49 +01:00
parent 1501ff442a
commit 8dd01d291d
11 changed files with 336 additions and 344 deletions

View file

@ -0,0 +1,8 @@
namespace PlanTempus.Database.Core.ConnectionFactory
{
public interface IDbConnectionFactory
{
System.Data.IDbConnection Create();
System.Data.IDbConnection Create(string username, string password);
}
}

View file

@ -1,15 +1,10 @@
using Npgsql;
using PlanTempus.Database.ModuleRegistry;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PlanTempus.Database.Core.ConnectionFactory
{
public class PostgresConnectionFactory : IDbConnectionFactory, IAsyncDisposable
public class PostgresConnectionFactory : IDbConnectionFactory, IAsyncDisposable
{
private readonly NpgsqlDataSource _baseDataSource;
private readonly Action<NpgsqlDataSourceBuilder> _configureDataSource;