SchemaBridge.EF
9.0.0
dotnet add package SchemaBridge.EF --version 9.0.0
NuGet\Install-Package SchemaBridge.EF -Version 9.0.0
<PackageReference Include="SchemaBridge.EF" Version="9.0.0" />
<PackageVersion Include="SchemaBridge.EF" Version="9.0.0" />
<PackageReference Include="SchemaBridge.EF" />
paket add SchemaBridge.EF --version 9.0.0
#r "nuget: SchemaBridge.EF, 9.0.0"
#:package SchemaBridge.EF@9.0.0
#addin nuget:?package=SchemaBridge.EF&version=9.0.0
#tool nuget:?package=SchemaBridge.EF&version=9.0.0
SchemaBridge.EF
SchemaBridge.EF is a lightweight helper library designed to simplify and standardize data migration when splitting a monolithic database into multiple databases or microservices.
It focuses on controlled, resumable, and verifiable data transfer between databases with identical or similar schemas, potentially using different database engines.
Motivation
When migrating from a monolith to a microservice architecture, it is often necessary to extract parts of an existing database into new services.
Writing one-off migration scripts for each case is time-consuming and error-prone. SchemaBridge.EF provides a structured pipeline and reusable abstractions to speed up and standardize this process.
Core Idea
With SchemaBridge.EF, you only need to implement:
- Table transporters — responsible for transferring table data
- Optional cache transporters — to track updates and deletions during migration
- Table checkers — to verify data integrity after transfer
The library handles discovery, execution order, batching, retries, and logging.
Transfer Pipeline
The default transfer pipeline is executed in the following order:
- Table transfer
- Updated cache transfer (optional)
- Removed cache transfer (optional)
- Post-transfer checks
Each stage is automatically discovered and executed using reflection.
Cache Tables (Updated / Removed)
During long-running migrations, data in the source database may continue to change. To avoid losing updates or deletions, SchemaBridge.EF supports cache-based tracking.
There are two cache types:
- Updated cache — tracks modified records
- Removed cache — tracks deleted records
These cache tables are optional.
If you do not need to track concurrent changes during migration, you may safely skip cache transporters entirely.
Prerequisites Before Transfer
Before starting the transfer process, you should:
- Create cache tables in the source database (if using cache transporters)
- Add triggers that track updated and removed records
- Disable auto-increment / identity generation on primary keys in the target database
After Transfer
Once the migration is complete:
- Re-enable auto-increment / identity generation on primary keys in the target database
- Remove or disable cache triggers if they are no longer needed
Interfaces
All required abstractions are defined in the SchemaBridge.EF.Interfaces namespace.
You implement these interfaces to describe how your data should be transferred and validated.
Example
The project contains a full integration test demonstrating the complete transfer pipeline, including table transport, cache handling, and validation.
See:
TransferServiceTests
This test uses in-memory databases and can be used as a reference implementation.
Summary
SchemaBridge.EF helps you:
- Migrate data safely from monoliths to microservices
- Track updates and deletions during migration
- Validate transferred data
- Avoid writing fragile one-off scripts
The library is intentionally minimal and focused on migration logic only.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- EFCore.BulkExtensions.Core (>= 9.0.2)
- Microsoft.EntityFrameworkCore (>= 9.0.12)
- morelinq (>= 4.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.0 | 96 | 1/18/2026 |