The FirebirdSQL .NET Provider repository at https contains a comprehensive suite of data providers for connecting .NET applications to Firebird database servers. The repository delivers three NuGet packages that support different data access paradigms: a foundational ADO.NET provider, an Entity Framework 6 provider, and an Entity Framework Core provider.
This documentation covers the architecture, implementation, and usage of all three providers, the build and testing infrastructure, and the internal protocol layer. For detailed usage information specific to each provider, see Core ADO.NET Provider, Entity Framework 6 Provider, and Entity Framework Core Provider. For build system details, see Build System. For testing infrastructure, see Testing Infrastructure.
Sources: README.md1-46
The repository produces three distinct NuGet packages that form a layered architecture:
| Package | Current Version | Target Frameworks | Primary Dependency | Purpose |
|---|---|---|---|---|
FirebirdSql.Data.FirebirdClient | 11.0.0-alpha1 | net8.0, net9.0, net10.0 | None | Core ADO.NET provider with connection, command, and transaction primitives |
EntityFramework.Firebird | 10.1.0 | net48, netstandard2.1 | EntityFramework 6.5.1 | Entity Framework 6 provider for legacy and cross-platform applications |
FirebirdSql.EntityFrameworkCore.Firebird | 13.0.0-alpha1 | net10.0 | Microsoft.EntityFrameworkCore.Relational 10.0.0 | Entity Framework Core provider for modern .NET applications |
Diagram: Package architecture showing key classes
The FirebirdSql.Data.FirebirdClient package (src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj) is the foundation that implements standard ADO.NET interfaces through classes like FbConnection, FbCommand, FbDataReader, and FbTransaction in the FirebirdSql.Data.FirebirdClient namespace. Both ORM packages depend on this core package to communicate with Firebird servers. The Entity Framework 6 provider (src/EntityFramework.Firebird/EntityFramework.Firebird.csproj) maintains compatibility with .NET Framework 4.8, while the Entity Framework Core provider (src/FirebirdSql.EntityFrameworkCore.Firebird/FirebirdSql.EntityFrameworkCore.Firebird.csproj) targets .NET 10.0.
Sources: README.md16-22 src/Versions.props1-18 src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj1-57 src/EntityFramework.Firebird/EntityFramework.Firebird.csproj1-58 src/FirebirdSql.EntityFrameworkCore.Firebird/FirebirdSql.EntityFrameworkCore.Firebird.csproj1-41
The providers support multiple Firebird server versions and leverage version-specific features when available:
Diagram: Supported Firebird and .NET framework versions
The providers implement graceful degradation: applications targeting Firebird 3.x can still use the same codebase, but Firebird 4+ specific features like FbBatchCommand, FbZonedDateTime, FbZonedTime, FbDecFloat, and BigInteger for INT128 are only available when connected to Firebird 4.x or 5.x servers. The continuous integration system validates all packages against all three Firebird versions to ensure compatibility.
Sources: Diagram 1 from high-level architecture, Diagram 2 from high-level architecture
The FirebirdSql.Data.FirebirdClient package implements standard ADO.NET interfaces through the following classes:
| Class | Namespace | Purpose |
|---|---|---|
FbConnection | FirebirdSql.Data.FirebirdClient | Connection lifecycle management, pooling via FbConnectionPoolManager |
FbCommand | FirebirdSql.Data.FirebirdClient | SQL execution with FbParameter support, stored procedures |
FbBatchCommand | FirebirdSql.Data.FirebirdClient | Firebird 4+ batch operations returning FbBatchNonQueryResult |
FbDataReader | FirebirdSql.Data.FirebirdClient | Forward-only result set iteration |
FbTransaction | FirebirdSql.Data.FirebirdClient | Transaction control with isolation levels and savepoints |
FbParameter | FirebirdSql.Data.FirebirdClient | Parameter binding with FbDbType enumeration |
FbConnectionStringBuilder | FirebirdSql.Data.FirebirdClient | Connection string configuration and parsing |
The connection management layer uses FbConnectionInternal and DatabaseBase for physical connections, while statement execution flows through StatementBase and GdsStatement classes in the internal protocol layer.
For detailed information, see Core ADO.NET Provider.
The ADO.NET provider includes administrative service classes in the FirebirdSql.Data.Services namespace:
| Class | Base Class | Purpose |
|---|---|---|
FbBackup | FbService | File-based database backup with FbBackupFlags |
FbStreamingBackup | FbService | Stream-based backup to memory or custom streams |
FbRestore | FbService | File-based database restore with FbRestoreFlags |
FbStreamingRestore | FbService | Stream-based restore from memory or custom streams |
FbValidation | FbService | Database validation with FbValidationFlags |
FbValidation2 | FbValidation | Advanced validation with filtering options |
FbConfiguration | FbService | Database settings, shutdown via FbShutdownMode |
FbStatistical | FbService | Database statistics collection |
FbNBackup | FbService | Incremental backup operations |
FbNRestore | FbService | Incremental restore operations |
All service classes communicate through ServiceManagerBase with Firebird's Service Manager process.
For detailed information, see Service Operations.
The EntityFramework.Firebird package provides FbProviderServices and FbMigrationSqlGenerator for Entity Framework 6 integration, while FirebirdSql.EntityFrameworkCore.Firebird provides FbRelationalConnection, FbQuerySqlGenerator, and FbMigrationsSqlGenerator for Entity Framework Core. Both packages translate LINQ queries to Firebird SQL and support database-first, model-first, and code-first workflows with migration support.
For detailed information, see Entity Framework Providers.
Sources: README.md3-14 src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj1-57
When connected to Firebird 4.x or later, the providers expose additional data types and capabilities:
| Feature | .NET Type | Firebird SQL Type | Documentation |
|---|---|---|---|
| Time Zones | FbZonedDateTime, FbZonedTime | TIMESTAMP WITH TIME ZONE, TIME WITH TIME ZONE | Firebird 4 Special Types |
| Decimal Floating Point | FbDecFloat | DECFLOAT(16), DECFLOAT(34) | Firebird 4 Special Types |
| 128-bit Integers | BigInteger | INT128 | Firebird 4 Special Types |
| Batch Operations | FbBatchCommand | Native batch protocol | Batch Commands |
These types integrate seamlessly with FbParameter and can be used in parameterized queries. The FbZonedDateTime and FbZonedTime types provide building blocks for developers to integrate with time zone libraries like NodaTime, as .NET lacks comprehensive cross-platform time zone support.
Sources: docs/batching.md1-22 docs/time-zones.md1-8 docs/decfloat.md1-8 docs/int128.md1-8 Diagram 5 from high-level architecture
Diagram: Repository file structure with key properties
The repository follows a standard .NET solution structure. All projects are in the src/ directory and reference src/Directory.Build.props which imports src/Versions.props for version management. The build system uses PowerShell scripts: build.ps1 with functions Clean(), Build(), Versions(), and NuGets() for compilation and packaging, and tests.ps1 with functions Prepare(), Tests-FirebirdClient(), Tests-EFCore(), Tests-EF6(), and Cleanup() for test execution. The GitHub Actions CI workflow in .github/workflows/ci.yml defines a matrix strategy with FIREBIRD_SELECTION (FB30, FB40, FB50) and TEST_SUITE parameters.
For build system details, see Build System. For CI workflow details, see Continuous Integration. For test infrastructure details, see Testing Infrastructure.
Sources: src/Directory.Build.props1-37 src/Versions.props1-18 build.ps11-49 tests.ps11-172 .github/workflows/ci.yml1-58
The providers implement a multi-layered type system that maps between .NET types and Firebird SQL types through specific classes:
Diagram: Type system with concrete class names
Application code provides .NET types to FbParameter objects, which are collected in FbParameterCollection. During command execution via FbCommand.ExecuteNonQuery() or FbCommand.ExecuteReader(), the parameter values flow through the Descriptor class, which contains an array of DbField objects describing each parameter's metadata. The DbValue class (in the FirebirdSql.Data.Common namespace) performs the actual type conversion, calling methods on XdrReaderWriter to encode values in XDR (External Data Representation) format for the Firebird wire protocol. Special handling exists for BLOBs via GdsBlob and ARRAYs via GdsArray in the FirebirdSql.Data.Client.Managed namespace.
For detailed information, see Data Type System.
Sources: src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj1-57 src/Directory.Build.props1-37
Contributors are welcome to submit pull requests. Key guidelines include:
For detailed contribution guidelines, see Contributing. For local development setup instructions, see Local Development Setup.
Sources: README.md24-46 CONTRIBUTING.md1-17
Refresh this wiki
This wiki was recently refreshed. Please wait 2 days to refresh again.