Search Results for

    Show / Hide Table of Contents

    Class NpgsqlOptionsExtension

    Represents options managed by the Npgsql.

    Inheritance
    object
    NpgsqlOptionsExtension
    Namespace: Npgsql.EntityFrameworkCore.PostgreSQL.Infrastructure.Internal
    Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
    Syntax
    public class NpgsqlOptionsExtension : RelationalOptionsExtension

    Constructors

    | Improve this Doc View Source

    NpgsqlOptionsExtension()

    Initializes an instance of NpgsqlOptionsExtension with the default settings.

    Declaration
    public NpgsqlOptionsExtension()
    | Improve this Doc View Source

    NpgsqlOptionsExtension(NpgsqlOptionsExtension)

    Initializes an instance of NpgsqlOptionsExtension by copying the specified instance.

    Declaration
    public NpgsqlOptionsExtension(NpgsqlOptionsExtension copyFrom)
    Parameters
    Type Name Description
    NpgsqlOptionsExtension copyFrom

    The instance to copy.

    Properties

    | Improve this Doc View Source

    AdminDatabase

    The name of the database for administrative operations.

    Declaration
    public virtual string? AdminDatabase { get; }
    Property Value
    Type Description
    string?
    | Improve this Doc View Source

    DataSource

    The , or null if a connection string or was used instead of a .

    Declaration
    public virtual DbDataSource? DataSource { get; }
    Property Value
    Type Description
    DbDataSource?
    | Improve this Doc View Source

    Info

    Declaration
    public override DbContextOptionsExtensionInfo Info { get; }
    Property Value
    Type Description
    DbContextOptionsExtensionInfo
    | Improve this Doc View Source

    MinBatchSize

    This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    Declaration
    public override int? MinBatchSize { get; }
    Property Value
    Type Description
    int?
    | Improve this Doc View Source

    PostgresVersion

    The backend version to target.

    Declaration
    public virtual Version? PostgresVersion { get; }
    Property Value
    Type Description
    Version?
    | Improve this Doc View Source

    ProvideClientCertificatesCallback

    The specified ProvideClientCertificatesCallback.

    Declaration
    public virtual ProvideClientCertificatesCallback? ProvideClientCertificatesCallback { get; }
    Property Value
    Type Description
    ProvideClientCertificatesCallback?
    | Improve this Doc View Source

    ProvidePasswordCallback

    The specified ProvidePasswordCallback.

    Declaration
    public virtual ProvidePasswordCallback? ProvidePasswordCallback { get; }
    Property Value
    Type Description
    ProvidePasswordCallback?
    | Improve this Doc View Source

    RemoteCertificateValidationCallback

    The specified RemoteCertificateValidationCallback.

    Declaration
    public virtual RemoteCertificateValidationCallback? RemoteCertificateValidationCallback { get; }
    Property Value
    Type Description
    RemoteCertificateValidationCallback?
    | Improve this Doc View Source

    ReverseNullOrdering

    True if reverse null ordering is enabled; otherwise, false.

    Declaration
    public virtual bool ReverseNullOrdering { get; }
    Property Value
    Type Description
    bool
    | Improve this Doc View Source

    UseRedshift

    Whether to target Redshift.

    Declaration
    public virtual bool UseRedshift { get; }
    Property Value
    Type Description
    bool
    | Improve this Doc View Source

    UserRangeDefinitions

    The list of range mappings specified by the user.

    Declaration
    public virtual IReadOnlyList<UserRangeDefinition> UserRangeDefinitions { get; }
    Property Value
    Type Description
    IReadOnlyList<><UserRangeDefinition>

    Methods

    | Improve this Doc View Source

    ApplyServices(IServiceCollection)

    Declaration
    public override void ApplyServices(IServiceCollection services)
    Parameters
    Type Name Description
    IServiceCollection services
    | Improve this Doc View Source

    Clone()

    Declaration
    protected override RelationalOptionsExtension Clone()
    Returns
    Type Description
    RelationalOptionsExtension
    | Improve this Doc View Source

    Validate(IDbContextOptions)

    Declaration
    public override void Validate(IDbContextOptions options)
    Parameters
    Type Name Description
    IDbContextOptions options
    | Improve this Doc View Source

    WithAdminDatabase(string?)

    Returns a copy of the current instance configured to use the specified administrative database.

    Declaration
    public virtual NpgsqlOptionsExtension WithAdminDatabase(string? adminDatabase)
    Parameters
    Type Name Description
    string? adminDatabase

    The name of the database for administrative operations.

    Returns
    Type Description
    NpgsqlOptionsExtension
    | Improve this Doc View Source

    WithDataSource(DbDataSource?)

    Creates a new instance with all options the same as for this instance, but with the given option changed. It is unusual to call this method directly. Instead use .

    Declaration
    public virtual RelationalOptionsExtension WithDataSource(DbDataSource? dataSource)
    Parameters
    Type Name Description
    DbDataSource? dataSource

    The option to change.

    Returns
    Type Description
    RelationalOptionsExtension

    A new instance with the option changed.

    | Improve this Doc View Source

    WithPostgresVersion(Version?)

    Returns a copy of the current instance with the specified PostgreSQL version.

    Declaration
    public virtual NpgsqlOptionsExtension WithPostgresVersion(Version? postgresVersion)
    Parameters
    Type Name Description
    Version? postgresVersion

    The backend version to target.

    Returns
    Type Description
    NpgsqlOptionsExtension

    A copy of the current instance with the specified PostgreSQL version.

    | Improve this Doc View Source

    WithProvideClientCertificatesCallback(ProvideClientCertificatesCallback?)

    Returns a copy of the current instance with the specified ProvideClientCertificatesCallback.

    Declaration
    public virtual NpgsqlOptionsExtension WithProvideClientCertificatesCallback(ProvideClientCertificatesCallback? callback)
    Parameters
    Type Name Description
    ProvideClientCertificatesCallback? callback

    The specified callback.

    Returns
    Type Description
    NpgsqlOptionsExtension
    | Improve this Doc View Source

    WithProvidePasswordCallback(ProvidePasswordCallback?)

    Returns a copy of the current instance with the specified ProvidePasswordCallback.

    Declaration
    public virtual NpgsqlOptionsExtension WithProvidePasswordCallback(ProvidePasswordCallback? callback)
    Parameters
    Type Name Description
    ProvidePasswordCallback? callback

    The specified callback.

    Returns
    Type Description
    NpgsqlOptionsExtension
    | Improve this Doc View Source

    WithRedshift(bool)

    Returns a copy of the current instance with the specified Redshift settings.

    Declaration
    public virtual NpgsqlOptionsExtension WithRedshift(bool useRedshift)
    Parameters
    Type Name Description
    bool useRedshift

    Whether to target Redshift.

    Returns
    Type Description
    NpgsqlOptionsExtension

    A copy of the current instance with the specified Redshift setting.

    | Improve this Doc View Source

    WithRemoteCertificateValidationCallback(RemoteCertificateValidationCallback?)

    Returns a copy of the current instance with the specified RemoteCertificateValidationCallback.

    Declaration
    public virtual NpgsqlOptionsExtension WithRemoteCertificateValidationCallback(RemoteCertificateValidationCallback? callback)
    Parameters
    Type Name Description
    RemoteCertificateValidationCallback? callback

    The specified callback.

    Returns
    Type Description
    NpgsqlOptionsExtension
    | Improve this Doc View Source

    WithUserRangeDefinition(string, string?, Type, string?)

    Returns a copy of the current instance configured with the specified range mapping.

    Declaration
    public virtual NpgsqlOptionsExtension WithUserRangeDefinition(string rangeName, string? schemaName, Type subtypeClrType, string? subtypeName)
    Parameters
    Type Name Description
    string rangeName
    string? schemaName
    Type subtypeClrType
    string? subtypeName
    Returns
    Type Description
    NpgsqlOptionsExtension
    | Improve this Doc View Source

    WithUserRangeDefinition<TSubtype>(string, string?, string?)

    Returns a copy of the current instance configured with the specified range mapping.

    Declaration
    public virtual NpgsqlOptionsExtension WithUserRangeDefinition<TSubtype>(string rangeName, string? schemaName = null, string? subtypeName = null)
    Parameters
    Type Name Description
    string rangeName
    string? schemaName
    string? subtypeName
    Returns
    Type Description
    NpgsqlOptionsExtension
    Type Parameters
    Name Description
    TSubtype
    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2023 The Npgsql Development Team