Is your feature request related to a problem? Please describe.
When using PostgreSQL projectors along with NodaTime, one needs to configure NpgsqlDataSourceBuilder. However, when initializing Postgres using AddEventuousPostgres, there is no way to customize the initialization. We could manually register NpgsqlDataSource, but that would require to repeat all the additional setup that is done by AddEventuousPostgres.
Describe the solution you'd like
Add a way to access NpgsqlDataSourceBuilder created by AddNpgsqlDataSourceCore.
For example, with EF, you can configure the builder as follows:
services.AddDbContext<PostregressDbContext>((provider, options) =>
{
options.UseNpgsql(connectionString.Value, b => b.UseNodaTime());
});
Describe alternatives you've considered
Manually registering NpgsqlDataSource.
Is your feature request related to a problem? Please describe. When using PostgreSQL projectors along with NodaTime, one needs to configure NpgsqlDataSourceBuilder. However, when initializing Postgres using
AddEventuousPostgres
, there is no way to customize the initialization. We could manually registerNpgsqlDataSource
, but that would require to repeat all the additional setup that is done by AddEventuousPostgres.Describe the solution you'd like Add a way to access
NpgsqlDataSourceBuilder
created byAddNpgsqlDataSourceCore
.For example, with EF, you can configure the builder as follows:
Describe alternatives you've considered Manually registering
NpgsqlDataSource
.Additional context NodaTime + PostgreSQL