WIP cozy
This commit is contained in:
parent
91da89a4e8
commit
a15cc00595
4 changed files with 20 additions and 36 deletions
|
|
@ -5,19 +5,13 @@ using System.Data;
|
|||
|
||||
namespace PlanTempus.Database.ConfigurationManagementSystem;
|
||||
|
||||
public class SetupConfiguration : IDbConfigure<SetupConfiguration.Command>
|
||||
public class SetupConfiguration(IDbConnectionFactory connectionFactory) : IDbConfigure<SetupConfiguration.Command>
|
||||
{
|
||||
public class Command { }
|
||||
|
||||
private readonly IDbConnectionFactory _connectionFactory;
|
||||
|
||||
public SetupConfiguration(IDbConnectionFactory connectionFactory)
|
||||
{
|
||||
_connectionFactory = connectionFactory;
|
||||
}
|
||||
public void With(Command notInUse, ConnectionStringParameters parameters = null)
|
||||
{
|
||||
using var conn = parameters is null ? _connectionFactory.Create() : _connectionFactory.Create(parameters);
|
||||
using var conn = parameters is null ? connectionFactory.Create() : connectionFactory.Create(parameters);
|
||||
using var transaction = conn.OpenWithTransaction();
|
||||
|
||||
try
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue