Files
Umbraco-CMS/src/Umbraco.Core/Persistence/IUmbracoDatabaseFactory.cs

42 lines
1.1 KiB
C#
Raw Normal View History

2017-07-20 11:21:28 +02:00
using System;
2016-12-16 14:18:37 +01:00
namespace Umbraco.Core.Persistence
{
2017-07-20 11:21:28 +02:00
/// <summary>
/// Creates and manages the "ambient" database.
/// </summary>
2017-09-22 18:28:21 +02:00
public interface IUmbracoDatabaseFactory : IDisposable
2017-07-20 11:21:28 +02:00
{
2016-12-16 14:18:37 +01:00
/// <summary>
/// Creates a new database.
/// </summary>
2017-05-12 14:49:44 +02:00
/// <remarks>The new database must be disposed after being used.</remarks>
2017-07-20 11:21:28 +02:00
IUmbracoDatabase CreateDatabase();
2016-12-16 14:18:37 +01:00
/// <summary>
/// Gets a value indicating whether the database factory is configured.
/// </summary>
bool Configured { get; }
/// <summary>
/// Gets a value indicating whether the database can connect.
/// </summary>
bool CanConnect { get; }
/// <summary>
/// Configures the database factory.
/// </summary>
void Configure(string connectionString, string providerName);
2017-09-22 18:28:21 +02:00
/// <summary>
/// Gets the Sql context.
/// </summary>
ISqlContext SqlContext { get; }
2018-03-30 10:16:21 +02:00
/// <summary>
/// Configures the database factory for upgrades.
/// </summary>
void ConfigureForUpgrade();
2016-12-16 14:18:37 +01:00
}
2017-07-20 11:21:28 +02:00
}