From 3c1707c2d2131b8d52dae69e005dcf59527de5e3 Mon Sep 17 00:00:00 2001 From: Poppyto Date: Thu, 4 May 2023 00:24:43 +0200 Subject: [PATCH] bugfix schema name (specially usefull when use multiple schema in one EF context) --- EFCore5/src/Storage/Internal/MySQLSqlGenerationHelper.cs | 2 +- EFCore6/src/Storage/Internal/MySQLSqlGenerationHelper.cs | 2 +- EFCore7/src/Storage/Internal/MySQLSqlGenerationHelper.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/EFCore5/src/Storage/Internal/MySQLSqlGenerationHelper.cs b/EFCore5/src/Storage/Internal/MySQLSqlGenerationHelper.cs index d31926fda..e5f433d48 100644 --- a/EFCore5/src/Storage/Internal/MySQLSqlGenerationHelper.cs +++ b/EFCore5/src/Storage/Internal/MySQLSqlGenerationHelper.cs @@ -92,6 +92,6 @@ protected virtual string GetObjectName(string name, string schema) => !string.IsNullOrEmpty(schema) && _options.SchemaNameTranslator != null ? _options.SchemaNameTranslator(schema, name) : name; - protected virtual string GetSchemaName(string name, string schema) => null; + protected virtual string GetSchemaName(string name, string schema) => schema; } } diff --git a/EFCore6/src/Storage/Internal/MySQLSqlGenerationHelper.cs b/EFCore6/src/Storage/Internal/MySQLSqlGenerationHelper.cs index 59f7e151d..7d17d32d6 100644 --- a/EFCore6/src/Storage/Internal/MySQLSqlGenerationHelper.cs +++ b/EFCore6/src/Storage/Internal/MySQLSqlGenerationHelper.cs @@ -83,6 +83,6 @@ protected virtual string GetObjectName(string name, string schema) ? _options.SchemaNameTranslator(schema, name) : name; - public virtual string? GetSchemaName(string name, string schema) => null; + public virtual string? GetSchemaName(string name, string schema) => schema; } } diff --git a/EFCore7/src/Storage/Internal/MySQLSqlGenerationHelper.cs b/EFCore7/src/Storage/Internal/MySQLSqlGenerationHelper.cs index b85c0dd63..de5e5059b 100644 --- a/EFCore7/src/Storage/Internal/MySQLSqlGenerationHelper.cs +++ b/EFCore7/src/Storage/Internal/MySQLSqlGenerationHelper.cs @@ -83,6 +83,6 @@ protected virtual string GetObjectName(string name, string schema) ? _options.SchemaNameTranslator(schema, name) : name; - protected virtual string? GetSchemaName(string name, string schema) => null; + protected virtual string? GetSchemaName(string name, string schema) => schema; } }