Framework version: 5.1.4 Angular/MVC SQL Server / MySql Separate Identity Server
I am opening a new issue since my previous one has been sitting unanswered for the past couple of weeks and seems to have fallen into a black hole.
I have an application that references two different database providers (SQL Server and MySQL). There are two different connection strings and two domain and EFCore projects. Each project uses the appropriate DB Context.
Both projects are references by the HttpApi.Host project but it seems as though only a single database management system is being used and the one that is used is the last referenced DependsOn module with a type of EntityFrameworkCoreModule in the Host project.
When the SqlServer module is last, the application starts fine and I don't get any errors until I invoke the application service (from an Application project that references both Domain projects) that uses the MySql repository. The error indicates that a SQL server driver is used when connecting to the MySql database:
2022-08-18 09:10:48.677 -07:00 [ERR] Keyword not supported: 'port'. System.ArgumentException: Keyword not supported: 'port'. at Microsoft.Data.SqlClient.SqlConnectionStringBuilder.GetIndex(String keyword) Here's what I've done so far and the issue I am experiencing:
When I swap these around and the MySql module is last, the application doesn't start because it attempts to connect to the SqlServer repositories used by the framework using a MySql connection:
2022-08-18 09:13:24.639 -07:00 [ERR] An exception was thrown while activating Volo.Abp.BackgroundJobs.EntityFrameworkCore.BackgroundJobsDbContext -> Î»:Microsoft.EntityFrameworkCore.DbContextOptions
1[[Volo.Abp.BackgroundJobs.EntityFrameworkCore.BackgroundJobsDbContext, Volo.Abp.BackgroundJobs.EntityFrameworkCore, Version=22.214.171.124, Culture=neutral, PublicKeyToken=null]]. Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.Abp.BackgroundJobs.EntityFrameworkCore.BackgroundJobsDbContext -> Î»:Microsoft.EntityFrameworkCore.DbContextOptions1[[Volo.Abp.BackgroundJobs.EntityFrameworkCore.BackgroundJobsDbContext, Volo.Abp.BackgroundJobs.EntityFrameworkCore, Version=126.96.36.199, Culture=neutral, PublicKeyToken=null]].
---> System.ArgumentException: Option 'trusted_connection' not supported.
at MySqlConnector.MySqlConnectionStringOption.GetOptionForKey(String key) in /_/src/MySqlConnector/MySqlConnectionStringBuilder.cs:line 927
In my Host project, I have the connection strings defined:
In the MySql Domain, Domain.Shared and EntityFrameworkCore projects, I have removed everything except for the minimum package references:
I am not sure how I can resolve this issue.