Class PostgreSqlDbContextOptionsBuilderExtensions
- Namespace
- Steeltoe.Connectors.EntityFrameworkCore.PostgreSql
- Assembly
- Steeltoe.Connectors.EntityFrameworkCore.dll
public static class PostgreSqlDbContextOptionsBuilderExtensions
- Inheritance
-
PostgreSqlDbContextOptionsBuilderExtensions
- Inherited Members
Methods
UseNpgsql(DbContextOptionsBuilder, IServiceProvider)
Configures the context to connect to a PostgreSQL server with Npgsql, using the default service binding.
public static DbContextOptionsBuilder UseNpgsql(this DbContextOptionsBuilder builder, IServiceProvider serviceProvider)
Parameters
builderDbContextOptionsBuilderThe builder being used to configure the DbContext.
serviceProviderIServiceProviderThe application's configured services.
Returns
- DbContextOptionsBuilder
The incoming
builderso that additional calls can be chained.
UseNpgsql(DbContextOptionsBuilder, IServiceProvider, string?)
Configures the context to connect to a PostgreSQL server with Npgsql, using a named service binding.
public static DbContextOptionsBuilder UseNpgsql(this DbContextOptionsBuilder builder, IServiceProvider serviceProvider, string? serviceBindingName)
Parameters
builderDbContextOptionsBuilderThe builder being used to configure the DbContext.
serviceProviderIServiceProviderThe application's configured services.
serviceBindingNamestringThe service binding name, or
nullto use the default service binding.
Returns
- DbContextOptionsBuilder
The incoming
builderso that additional calls can be chained.
UseNpgsql(DbContextOptionsBuilder, IServiceProvider, string?, Action<object>?)
Configures the context to connect to a PostgreSQL server with Npgsql, using a named service binding and options.
public static DbContextOptionsBuilder UseNpgsql(this DbContextOptionsBuilder builder, IServiceProvider serviceProvider, string? serviceBindingName, Action<object>? npgsqlOptionsAction)
Parameters
builderDbContextOptionsBuilderThe builder being used to configure the DbContext.
serviceProviderIServiceProviderThe application's configured services.
serviceBindingNamestringThe service binding name, or
nullto use the default service binding.npgsqlOptionsActionAction<object>An action to allow additional Npgsql-specific configuration.
Returns
- DbContextOptionsBuilder
The incoming
builderso that additional calls can be chained.