From c0cad3b0a9b3f83a275aae0779745c4d7a980be8 Mon Sep 17 00:00:00 2001 From: Erik Ejlskov Jensen Date: Sun, 15 Dec 2024 09:33:07 +0100 Subject: [PATCH] EF Core 9 Firebird support Add missing T4 split support for EF Core 9 CLI fixes #2538 --- src/Core/RevEng.Core.80/ConnectionStringResolver.cs | 8 +++----- src/Core/RevEng.Core.80/ServiceProviderBuilder.cs | 6 +++--- src/Core/RevEng.Core.90/RevEng.Core.90.csproj | 2 +- src/Core/efcpt.9/efcpt.9.csproj | 3 +++ 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/Core/RevEng.Core.80/ConnectionStringResolver.cs b/src/Core/RevEng.Core.80/ConnectionStringResolver.cs index 4e25795a7..a07b20a4e 100644 --- a/src/Core/RevEng.Core.80/ConnectionStringResolver.cs +++ b/src/Core/RevEng.Core.80/ConnectionStringResolver.cs @@ -2,14 +2,12 @@ using System.Collections.Generic; using System.Data.Common; using System.IO; +using FirebirdSql.Data.FirebirdClient; using Microsoft.Data.SqlClient; using Microsoft.Data.Sqlite; using MySqlConnector; using Npgsql; using Oracle.ManagedDataAccess.Client; -#if !CORE90 -using FirebirdSql.Data.FirebirdClient; -#endif namespace RevEng.Core { @@ -85,7 +83,7 @@ public IList ResolveAlias() { // Ignore } -#if !CORE90 + try { var a = new FbConnectionStringBuilder(connectionString); @@ -95,7 +93,7 @@ public IList ResolveAlias() { // Ignore } -#endif + return aliases; } diff --git a/src/Core/RevEng.Core.80/ServiceProviderBuilder.cs b/src/Core/RevEng.Core.80/ServiceProviderBuilder.cs index a3d5de820..add9fb312 100644 --- a/src/Core/RevEng.Core.80/ServiceProviderBuilder.cs +++ b/src/Core/RevEng.Core.80/ServiceProviderBuilder.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; #if !CORE90 using EFCore.Snowflake.Design.Internal; -using FirebirdSql.EntityFrameworkCore.Firebird.Design.Internal; #endif using EntityFrameworkCore.Scaffolding.Handlebars; using ErikEJ.EntityFrameworkCore.SqlServer.Scaffolding; +using FirebirdSql.EntityFrameworkCore.Firebird.Design.Internal; using Humanizer.Inflections; using Microsoft.EntityFrameworkCore.Design; using Microsoft.EntityFrameworkCore.Design.Internal; @@ -125,12 +125,12 @@ public static IServiceCollection AddEfpt(this IServiceCollection serviceCollecti var oracleProvider = new OracleDesignTimeServices(); oracleProvider.ConfigureDesignTimeServices(serviceCollection); break; -#if !CORE90 + case DatabaseType.Firebird: var firebirdProvider = new FbDesignTimeServices(); firebirdProvider.ConfigureDesignTimeServices(serviceCollection); break; - +#if !CORE90 case DatabaseType.Snowflake: var snowflakeProvider = new SnowflakeDesignTimeServices(); snowflakeProvider.ConfigureDesignTimeServices(serviceCollection); diff --git a/src/Core/RevEng.Core.90/RevEng.Core.90.csproj b/src/Core/RevEng.Core.90/RevEng.Core.90.csproj index 8be417319..1682d07b4 100644 --- a/src/Core/RevEng.Core.90/RevEng.Core.90.csproj +++ b/src/Core/RevEng.Core.90/RevEng.Core.90.csproj @@ -30,7 +30,7 @@ - + diff --git a/src/Core/efcpt.9/efcpt.9.csproj b/src/Core/efcpt.9/efcpt.9.csproj index 7d8339094..91b2e7cc7 100644 --- a/src/Core/efcpt.9/efcpt.9.csproj +++ b/src/Core/efcpt.9/efcpt.9.csproj @@ -47,6 +47,9 @@ Always + + Always + Always