From c9ce25d92be6ed119968d4675207ed9c39e796a2 Mon Sep 17 00:00:00 2001 From: xiang <27800734@qq.com> Date: Wed, 7 May 2025 22:54:38 +0800 Subject: [PATCH] 1 --- Yes.Infrastructure/Data/DbContexts/BlogDbContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Yes.Infrastructure/Data/DbContexts/BlogDbContext.cs b/Yes.Infrastructure/Data/DbContexts/BlogDbContext.cs index da665f4..6e21d73 100644 --- a/Yes.Infrastructure/Data/DbContexts/BlogDbContext.cs +++ b/Yes.Infrastructure/Data/DbContexts/BlogDbContext.cs @@ -21,7 +21,7 @@ _ = _databaseType switch { DatabaseTypeEnum.SqlServer => builder.UseSqlServer(_connectionString), - DatabaseTypeEnum.MySql => builder.UseMySql(_connectionString, string.IsNullOrEmpty(_databaseVersion) ? MySqlServerVersion.AutoDetect(_connectionString) : new MySqlServerVersion(_databaseVersion)), + DatabaseTypeEnum.MySql => builder.UseMySql(_connectionString, string.IsNullOrEmpty(_databaseVersion) ? MySqlServerVersion.AutoDetect(_connectionString) : new MySqlServerVersion(_databaseVersion), builder => builder.TranslateParameterizedCollectionsToConstants()), DatabaseTypeEnum.PostgreSQL => builder.UseNpgsql(_connectionString), _ => throw new DatabaseNotSupportedException()