This sample demonstrates configuring JD.Efcpt.Build for Firebird using Connection String
Mode, and shows the shape of the EF Core models efcpt generates for a Firebird schema.
EfcptProvider=firebirdconfiguration- The
FirebirdSql.EntityFrameworkCore.Firebirdruntime provider wired up inAppDbContext - A minimal
efcpt-config.jsonfor connection-string-mode generation - How to keep a sample buildable in CI without a live database by committing a reference copy of the generated code (see Committed Generated Code below)
provider-firebird/
├── ProviderFirebird.sln
├── nuget.config
└── EntityFrameworkCoreProject/
├── EntityFrameworkCoreProject.csproj
├── efcpt-config.json
└── Generated/ # Committed reference copy (see below)
├── AppDbContext.cs
└── Entities/
├── Customer.cs
└── Order.cs
Database=localhost:mydb.fdb;User=SYSDBA;Password=masterkey
Firebird has no DACPAC equivalent, so real generation requires a live database:
- Install the Firebird driver satellite package (only needed while regenerating,
JD.Efcpt.Build itself is already referenced):
dotnet add EntityFrameworkCoreProject package JD.Efcpt.Build.Firebird
- Point at a real database and build:
(
set EfcptConnectionString=Database=localhost:mydb.fdb;User=SYSDBA;Password=masterkey dotnet build EntityFrameworkCoreProject
export EfcptConnectionString=...on macOS/Linux.)
With EfcptConnectionString set, EfcptEnabled turns on automatically (see the csproj), efcpt
regenerates real models into obj/efcpt/Generated, and the committed Generated/ reference copy
in the project directory is excluded from compilation for that build so the two don't collide.
Without a connection string (as in CI), EfcptEnabled is forced to false, which fully
short-circuits generation - no DB connection, DACPAC query, or efcpt invocation happens. Instead
the project compiles the committed Generated/AppDbContext.cs and Generated/Entities/*.cs
files, which are hand-written to mirror realistic efcpt output for a CUSTOMERS/ORDERS
schema. This is what lets dotnet build EntityFrameworkCoreProject -p:EfcptEnabled=false succeed
in CI with zero database dependency - see the samples-build job in .github/workflows/ci.yml.
dotnet build ProviderFirebird.sln