BasicAuth bezieht Realm aus dem Validator. DNS Resolve für E-Mail Validierung geändert. Moq-Package hinzugefügt.
This commit is contained in:
@@ -66,19 +66,24 @@ namespace Microsoft.EntityFrameworkCore
|
||||
return DatabaseProvider.SQLite;
|
||||
if (provider.Contains("sqlclient", StringComparison.OrdinalIgnoreCase))
|
||||
return DatabaseProvider.SQLServer;
|
||||
if (provider.Contains("inmemory", StringComparison.OrdinalIgnoreCase))
|
||||
return DatabaseProvider.InMemory;
|
||||
|
||||
throw new DatabaseProviderException($"The database provider '{provider}' is unknown");
|
||||
}
|
||||
|
||||
private static async Task<bool> CreateMigrationsTable(this DbConnection connection, DatabaseMigrationOptions options, CancellationToken cancellationToken)
|
||||
{
|
||||
if (connection.GetProviderType() == DatabaseProvider.InMemory)
|
||||
return true;
|
||||
|
||||
try
|
||||
{
|
||||
using var command = connection.CreateCommand();
|
||||
|
||||
#pragma warning disable CS8524 // missing default case
|
||||
#pragma warning disable CS8509 // ignore missing cases
|
||||
command.CommandText = connection.GetProviderType() switch
|
||||
#pragma warning restore CS8524 // missing default case
|
||||
#pragma warning restore CS8509 // ignore missing cases
|
||||
{
|
||||
DatabaseProvider.MySQL => $@"CREATE TABLE IF NOT EXISTS `{options.MigrationsTableName}` (
|
||||
`id` INT NOT NULL AUTO_INCREMENT,
|
||||
@@ -135,6 +140,9 @@ END;"
|
||||
|
||||
private static async Task<bool> Migrate(this DbConnection connection, DatabaseMigrationOptions options, CancellationToken cancellationToken)
|
||||
{
|
||||
if (connection.GetProviderType() == DatabaseProvider.InMemory)
|
||||
return true;
|
||||
|
||||
try
|
||||
{
|
||||
List<string> availableMigrationFiles;
|
||||
@@ -279,7 +287,8 @@ END;"
|
||||
Oracle = 2,
|
||||
PostgreSQL = 3,
|
||||
SQLite = 4,
|
||||
SQLServer = 5
|
||||
SQLServer = 5,
|
||||
InMemory = 6,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user