From b41f283a4a2b0b5c683a513f44468fa8f0ca6569 Mon Sep 17 00:00:00 2001 From: Engincan VESKE Date: Thu, 23 Oct 2025 06:39:22 +0000 Subject: [PATCH] Update mysql.md --- docs/en/framework/data/entity-framework-core/mysql.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/en/framework/data/entity-framework-core/mysql.md b/docs/en/framework/data/entity-framework-core/mysql.md index 41ccf237a4..f5254e2419 100644 --- a/docs/en/framework/data/entity-framework-core/mysql.md +++ b/docs/en/framework/data/entity-framework-core/mysql.md @@ -32,16 +32,18 @@ Find `UseSqlServer()` calls in your solution. Check the following files: Alternatively, you can use the [Pomelo.EntityFrameworkCore.MySql](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql) provider. Replace the [Volo.Abp.EntityFrameworkCore.MySQL](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.MySQL) package with the [Volo.Abp.EntityFrameworkCore.MySQL.Pomelo](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.MySQL.Pomelo) package in your `.EntityFrameworkCore` project. -Find ***YourProjectName*EntityFrameworkCoreModule** class inside the `.EntityFrameworkCore` project, replace `typeof(AbpEntityFrameworkCoreMySQLModule)` with `typeof(AbpEntityFrameworkCoreMySQLPomeloModule)` in the `DependsOn` attribute. +To complete the switch to the Pomelo Provider, you'll need to update your module dependencies. To do that, find ***YourProjectName*EntityFrameworkCoreModule** class inside the `.EntityFrameworkCore` project, replace `typeof(AbpEntityFrameworkCoreMySQLModule)` with `typeof(AbpEntityFrameworkCoreMySQLPomeloModule)` in the `DependsOn` attribute. -## UseMySQL() +Also, if you are switching from a provider other than ABP's MySQL provider, you need to call the `UseMySQL` method in the relevant places, as described in the next section. + +### UseMySQL() Find `UseSqlServer()` calls in your solution. Check the following files: * *YourProjectName*EntityFrameworkCoreModule.cs inside the `.EntityFrameworkCore` project. Replace `UseSqlServer()` with `UseMySql()`. * *YourProjectName*DbContextFactory.cs inside the `.EntityFrameworkCore` project. Replace `UseSqlServer()` with `UseMySql()`. -You also need to specify the `ServerVersion`, See https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/wiki/Configuration-Options#server-version for more details. +You also need to specify the `ServerVersion`. See https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/wiki/Configuration-Options#server-version for more details. `UseMySql(configuration.GetConnectionString("Default"), ServerVersion.AutoDetect(configuration.GetConnectionString("Default")));` or `UseMySql(configuration.GetConnectionString("Default"), new MySqlServerVersion(new Version(8, 4, 6)));`