Skip to content

Commit

Permalink
Add MySql suppot for EF Core 9
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikEJ committed Dec 13, 2024
1 parent 2406c89 commit c8a38c6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/vsix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
mkdir vsix
7z x src/GUI/lib/efreveng90.exe.zip -oefreveng90 -y
dir /a:-d /s /b "efreveng90" | find /c ":\" > filecount.txt
findstr "144" filecount.txt
findstr "147" filecount.txt
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
Expand Down
6 changes: 3 additions & 3 deletions src/Core/RevEng.Core.80/ConnectionStringResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
using System.IO;
using Microsoft.Data.SqlClient;
using Microsoft.Data.Sqlite;
using MySqlConnector;
using Npgsql;
using Oracle.ManagedDataAccess.Client;
#if !CORE90
using FirebirdSql.Data.FirebirdClient;
using MySqlConnector;
#endif

namespace RevEng.Core
Expand Down Expand Up @@ -75,7 +75,7 @@ public IList<string> ResolveAlias()
{
// Ignore
}
#if !CORE90

try
{
var a = new MySqlConnectionStringBuilder(connectionString);
Expand All @@ -85,7 +85,7 @@ public IList<string> ResolveAlias()
{
// Ignore
}

#if !CORE90
try
{
var a = new FbConnectionStringBuilder(connectionString);
Expand Down
6 changes: 2 additions & 4 deletions src/Core/RevEng.Core.80/ServiceProviderBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
using Microsoft.Extensions.DependencyInjection;
using Npgsql.EntityFrameworkCore.PostgreSQL.Design.Internal;
using Oracle.EntityFrameworkCore.Design.Internal;
#if !CORE90
using Pomelo.EntityFrameworkCore.MySql.Design.Internal;
#endif
using RevEng.Common;
using RevEng.Core.Routines.Extensions;
using SimplerSoftware.EntityFrameworkCore.SqlServer.NodaTime.Design;
Expand Down Expand Up @@ -110,7 +108,7 @@ public static IServiceCollection AddEfpt(this IServiceCollection serviceCollecti
AddPostgresProviderServices(serviceCollection, options);

break;
#if !CORE90

case DatabaseType.Mysql:
var mysqlProvider = new MySqlDesignTimeServices();
mysqlProvider.ConfigureDesignTimeServices(serviceCollection);
Expand All @@ -122,7 +120,7 @@ public static IServiceCollection AddEfpt(this IServiceCollection serviceCollecti
}

break;
#endif

case DatabaseType.Oracle:
var oracleProvider = new OracleDesignTimeServices();
oracleProvider.ConfigureDesignTimeServices(serviceCollection);
Expand Down
2 changes: 1 addition & 1 deletion src/Core/RevEng.Core.90/RevEng.Core.90.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" Version="9.0.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="9.0.1" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="9.23.60" />
<!-- <PackageReference Include="Pomelo.EntityFrameworkCore.MySql.NetTopologySuite" Version="8.0.2" />-->
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.NetTopologySuite" Version="9.0.0-preview.2.efcore.9.0.0" />
<PackageReference Include="SimplerSoftware.EntityFrameworkCore.SqlServer.NodaTime" Version="9.0.0" />
<PackageReference Include="System.CodeDom" Version="8.0.0" />
</ItemGroup>
Expand Down
Binary file modified src/GUI/lib/efreveng90.exe.zip
Binary file not shown.

0 comments on commit c8a38c6

Please sign in to comment.