Skip to content

Add AddSlimNpgsqlDataSource to Npgsql.DependencyInjection#5316

Merged
roji merged 2 commits intonpgsql:mainfrom
manandre:di-slim
Oct 8, 2023
Merged

Add AddSlimNpgsqlDataSource to Npgsql.DependencyInjection#5316
roji merged 2 commits intonpgsql:mainfrom
manandre:di-slim

Conversation

@manandre
Copy link
Collaborator

@manandre manandre commented Oct 8, 2023

Closes #5288

We could introduce an INpgsqlDataSourceBuilder (public?) interface to reduce code duplication, if required.

@manandre manandre requested review from roji and vonzshik as code owners October 8, 2023 13:15
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @manandre!

We should probably improve the API docs to clarify what the slim builder is good for; I'll do that in a later doc pass (#5317).

/// Defaults to <see cref="ServiceLifetime.Singleton" />.
/// </param>
/// <returns>The same service collection so that multiple calls can be chained.</returns>
public static IServiceCollection AddMultiHostNpgsqlSlimDataSource(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely 🤣

@roji roji enabled auto-merge (squash) October 8, 2023 13:23
@roji roji merged commit a8e0511 into npgsql:main Oct 8, 2023
@manandre manandre deleted the di-slim branch October 8, 2023 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AddSlimNpgsqlDataSource to Npgsql.DependencyInjection

2 participants