Search Results for

    Show / Hide Table of Contents

    Interface IUmbracoDatabaseFactory

    Creates and manages the "ambient" database.

    Namespace: Umbraco.Cms.Infrastructure.Persistence
    Assembly: cs.temp.dll.dll
    Syntax
    public interface IUmbracoDatabaseFactory : IDisposable

    Properties

    BulkSqlInsertProvider

    Gets the IBulkSqlInsertProvider.

    Declaration
    IBulkSqlInsertProvider BulkSqlInsertProvider { get; }
    Property Value
    Type Description
    IBulkSqlInsertProvider
    Remarks

    Getting the IBulkSqlInsertProvider causes the factory to initialize if it is not already initialized.

    CanConnect

    Gets a value indicating whether the database factory is configured (see Configured), and it is possible to connect to the database. The factory may however not be initialized (see Initialized).

    Declaration
    bool CanConnect { get; }
    Property Value
    Type Description
    System.Boolean

    Configured

    Gets a value indicating whether the database factory is configured, i.e. whether its connection string and provider name have been set. The factory may however not be initialized (see Initialized).

    Declaration
    bool Configured { get; }
    Property Value
    Type Description
    System.Boolean

    ConnectionString

    Gets the connection string.

    Declaration
    string ConnectionString { get; }
    Property Value
    Type Description
    System.String
    Remarks

    May return null if the database factory is not configured.

    Initialized

    Gets a value indicating whether the database factory is initialized, i.e. whether its internal state is ready and it has been possible to connect to the database.

    Declaration
    bool Initialized { get; }
    Property Value
    Type Description
    System.Boolean

    ProviderName

    Gets the provider name.

    Declaration
    string ProviderName { get; }
    Property Value
    Type Description
    System.String
    Remarks

    May return null if the database factory is not configured.

    SqlContext

    Gets the ISqlContext.

    Declaration
    ISqlContext SqlContext { get; }
    Property Value
    Type Description
    ISqlContext
    Remarks

    Getting the ISqlContext causes the factory to initialize if it is not already initialized.

    Methods

    Configure(String, String)

    Configures the database factory.

    Declaration
    void Configure(string connectionString, string providerName)
    Parameters
    Type Name Description
    System.String connectionString
    System.String providerName

    ConfigureForUpgrade()

    Configures the database factory for upgrades.

    Declaration
    void ConfigureForUpgrade()

    CreateDatabase()

    Creates a new database.

    Declaration
    IUmbracoDatabase CreateDatabase()
    Returns
    Type Description
    IUmbracoDatabase
    Remarks

    The new database must be disposed after being used.

    Creating a database causes the factory to initialize if it is not already initialized.

    In This Article
    • Properties
      • BulkSqlInsertProvider
      • CanConnect
      • Configured
      • ConnectionString
      • Initialized
      • ProviderName
      • SqlContext
    • Methods
      • Configure(String, String)
      • ConfigureForUpgrade()
      • CreateDatabase()
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX