Changed const to return "Microsoft.Data.Sqlite" instead of "Microsoft.Data.SQLite" and made our checks case insensitive where possible. Sadly DbProviderFactories is still case sensative so for that we support both strings. (#12639)

https://github.com/umbraco/Umbraco-CMS/issues/12604
This commit is contained in:
Bjarke Berg
2022-06-29 16:49:47 +02:00
committed by GitHub
parent fb35c47c70
commit 62eeb42004
6 changed files with 16 additions and 10 deletions

View File

@@ -27,7 +27,7 @@ public static class DatabaseProviderMetadataExtensions
/// <c>true</c> if a database can be created for the specified provider name; otherwise, <c>false</c>.
/// </returns>
public static bool CanForceCreateDatabase(this IEnumerable<IDatabaseProviderMetadata> databaseProviderMetadata, string? providerName)
=> databaseProviderMetadata.FirstOrDefault(x => x.ProviderName == providerName)?.ForceCreateDatabase == true;
=> databaseProviderMetadata.FirstOrDefault(x => string.Equals(x.ProviderName, providerName, StringComparison.InvariantCultureIgnoreCase))?.ForceCreateDatabase == true;
/// <summary>
/// Generates the connection string.