Changes to TenantData
This commit is contained in:
parent
fcffb57ac6
commit
c10de11bbe
6 changed files with 196 additions and 145 deletions
|
|
@ -3,20 +3,19 @@ using Npgsql;
|
|||
using System.Data;
|
||||
namespace Core.ModuleRegistry
|
||||
{
|
||||
public class DbPostgreSqlModule : Module
|
||||
{
|
||||
public string ConnectionString { get; set; }
|
||||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
public class DbPostgreSqlModule : Module
|
||||
{
|
||||
public required string ConnectionString { get; set; }
|
||||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
|
||||
builder.Register(c =>
|
||||
{
|
||||
IDbConnection connection = new NpgsqlConnection(ConnectionString);
|
||||
return connection;
|
||||
})
|
||||
.InstancePerLifetimeScope();
|
||||
builder.Register(c =>
|
||||
{
|
||||
IDbConnection connection = new NpgsqlConnection(ConnectionString);
|
||||
return connection;
|
||||
})
|
||||
.InstancePerLifetimeScope();
|
||||
|
||||
//builder.RegisterType<IDbConnection>().As<IDbConnection>().InstancePerLifetimeScope();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue