Search Results for

    Show / Hide Table of Contents

    Class DatabaseConfigurationOptionsBuilder

    Provides an option builder to further statically configure a Database instance.

    Inheritance
    Object
    DatabaseConfigurationOptionsBuilder
    Namespace: Venflow
    Assembly: Venflow.dll
    Syntax
    public class DatabaseConfigurationOptionsBuilder : object

    Methods

    | Improve this Doc View Source

    RegisterPostgresEnum<TEnum>(Nullable<String>, Nullable<INpgsqlNameTranslator>)

    Maps a PostgreSQL enum to a CLR enum.

    Declaration
    public DatabaseConfigurationOptionsBuilder RegisterPostgresEnum<TEnum>(string? name = null, INpgsqlNameTranslator? npgsqlNameTranslator = null)
        where TEnum : struct, Enum
    Parameters
    Type Name Description
    Nullable<String> name

    The name of the enum in PostgreSQL, if none used it will try to convert the name of the CLR enum e.g. 'FooBar' to 'foo_bar'

    Nullable<INpgsqlNameTranslator> npgsqlNameTranslator

    A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). Defaults to .

    Returns
    Type Description
    DatabaseConfigurationOptionsBuilder

    The same builder instance so that multiple calls can be chained.

    Type Parameters
    Name Description
    TEnum

    The type of the enum.

    | Improve this Doc View Source

    SetNamingConvention(INpgsqlNameTranslator)

    Sets the default naming convention to be used for entity table and column names.

    Declaration
    public DatabaseConfigurationOptionsBuilder SetNamingConvention(INpgsqlNameTranslator npgsqlNameTranslator)
    Parameters
    Type Name Description
    INpgsqlNameTranslator npgsqlNameTranslator

    An implementation of to be used as the default for name translation.

    Returns
    Type Description
    DatabaseConfigurationOptionsBuilder

    The same builder instance so that multiple calls can be chained.

    | Improve this Doc View Source

    SetNamingConvention<T>()

    Sets the default naming convention to be used for entity table and column names.

    Declaration
    public DatabaseConfigurationOptionsBuilder SetNamingConvention<T>()
        where T : INpgsqlNameTranslator, new()
    Returns
    Type Description
    DatabaseConfigurationOptionsBuilder

    The same builder instance so that multiple calls can be chained.

    Type Parameters
    Name Description
    T

    An implementation of to be used as the default for name translation.

    | Improve this Doc View Source

    UseConfigurations(Assembly)

    Adds the assembly to the EntityConfiguration<TEntity> lookup list.

    Declaration
    public DatabaseConfigurationOptionsBuilder UseConfigurations(Assembly assembly)
    Parameters
    Type Name Description
    Assembly assembly

    The assembly which should be added to the lookup list.

    Returns
    Type Description
    DatabaseConfigurationOptionsBuilder

    An object that can be used to configure the current Database instance.

    Remarks

    If you add a custom configuration location, the assembly of the database type will not be automatically included.

    | Improve this Doc View Source

    UseConfigurations(Assembly[])

    Adds the assemblies to the EntityConfiguration<TEntity> lookup list.

    Declaration
    public DatabaseConfigurationOptionsBuilder UseConfigurations(params Assembly[] assemblies)
    Parameters
    Type Name Description
    Assembly[] assemblies

    The assemblies which should be added to the lookup list.

    Returns
    Type Description
    DatabaseConfigurationOptionsBuilder

    An object that can be used to configure the current Database instance.

    Remarks

    If you add a custom configuration location, the assembly of the database type will not be automatically included.

    | Improve this Doc View Source

    UseConfigurations<T>()

    Adds the assembly of the type T to the EntityConfiguration<TEntity> lookup list.

    Declaration
    public DatabaseConfigurationOptionsBuilder UseConfigurations<T>()
    Returns
    Type Description
    DatabaseConfigurationOptionsBuilder

    An object that can be used to configure the current Database instance.

    Type Parameters
    Name Description
    T

    The type of which the assembly should be added to the lookup list.

    Remarks

    If you add a custom configuration location, the assembly of the database type will not be automatically included.

    Theme

    • Improve this Doc
    • View Source
    Back to top Copyright © 2021 Twenty