Class DatabaseProviderMetadataExtensions
Extension methods for IDatabase
Inheritance
Namespace: Umbraco.Cms.Infrastructure.Persistence
Assembly: Umbraco.Infrastructure.dll
Syntax
public static class DatabaseProviderMetadataExtensions
Methods
View SourceCanForceCreateDatabase(IEnumerable<IDatabaseProviderMetadata>, String)
Determines whether a database can be created for the specified provider name while ignoring the value of Install
Declaration
public static bool CanForceCreateDatabase(this IEnumerable<IDatabaseProviderMetadata> databaseProviderMetadata, string providerName)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IDatabase |
databaseProviderMetadata | The database provider metadata. |
System. |
providerName | The name of the provider. |
Returns
Type | Description |
---|---|
System. |
|
CanForceCreateDatabase(IEnumerable<IDatabaseProviderMetadata>, IUmbracoDatabaseFactory)
Determines whether a database can be created for the specified provider name while ignoring the value of Install
Declaration
public static bool CanForceCreateDatabase(this IEnumerable<IDatabaseProviderMetadata> databaseProviderMetadata, IUmbracoDatabaseFactory umbracoDatabaseFactory)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IDatabase |
databaseProviderMetadata | The database provider metadata. |
IUmbraco |
umbracoDatabaseFactory | The database factory. |
Returns
Type | Description |
---|---|
System. |
|
GenerateConnectionString(IDatabaseProviderMetadata, String, String, String, String, Nullable<Boolean>)
Generates the connection string.
Declaration
public static string GenerateConnectionString(this IDatabaseProviderMetadata databaseProviderMetadata, string databaseName = null, string server = null, string login = null, string password = null, bool? integratedAuth = null)
Parameters
Type | Name | Description |
---|---|---|
IDatabase |
databaseProviderMetadata | The database provider metadata. |
System. |
databaseName | The name of the database, uses the default database name when |
System. |
server | The server. |
System. |
login | The login. |
System. |
password | The password. |
System. |
integratedAuth | Indicates whether integrated authentication should be used (when supported by the provider). |
Returns
Type | Description |
---|---|
System. |
The generated connection string. |
GetAvailable(IEnumerable<IDatabaseProviderMetadata>, Boolean)
Gets the available database provider metadata.
Declaration
public static IEnumerable<IDatabaseProviderMetadata> GetAvailable(this IEnumerable<IDatabaseProviderMetadata> databaseProviderMetadata, bool onlyQuickInstall = false)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IDatabase |
databaseProviderMetadata | The database provider metadata. |
System. |
onlyQuickInstall | If set to |
Returns
Type | Description |
---|---|
IEnumerable<IDatabase |
The available database provider metadata. |