Part of the EF Core migration generation epic — tracking issue #371.
Documentation for the whole feature. All code samples must be mdsnippets sourced from compilable test projects (repo convention — no inline hand-typed samples).
New pages (under docs/efcore/)
- Migration generation overview — what it is, when to use it vs. Weasel's native
db-patch/db-apply flow; the generated artifacts (migration classes, stub context, snapshot file) and what each is for.
- Getting started —
db-ef-migration add → dotnet ef database update walkthrough with a Marten-style IDatabase.
- Coexistence guide — mixed EF Core + Marten/Polecat/Wolverine applications: multi-context setup, the relocated history table,
--context usage, and the single-owner rule (a table is managed by exactly one migration stream; excluding critter-stack-managed tables from the app context via IsTableExcludedFromMigrations).
- EF Core projections — the round-trip story: projection DbContext →
MapToTable → IDatabase → generated migrations include projection tables automatically; ownership guidance.
- Adopting existing databases —
db-ef-migration baseline / history backfill.
- Limitations & raw-SQL fallbacks — partitioning, functions/procedures, sequences, rich index options emitted as
Sql() blocks; no dotnet ef migrations add/remove against the stub context; EF 9 PendingModelChangesWarning suppression explained.
Updates to existing docs
docs/efcore/migrations.md — position the two directions (Weasel-applies vs. EF-artifact generation) side by side.
- Computed columns documented in the relevant table-modeling pages (PostgreSQL + SQL Server), since Weasel gains that capability in this epic.
CLAUDE.md / EFCORE_IMPROVEMENTS.md — update capability lists and remove closed gaps.
Downstream (tracked in their own repos, not here): short consumption pages for Marten, Polecat, and Wolverine.
Part of the EF Core migration generation epic — tracking issue #371.
Documentation for the whole feature. All code samples must be mdsnippets sourced from compilable test projects (repo convention — no inline hand-typed samples).
New pages (under
docs/efcore/)db-patch/db-applyflow; the generated artifacts (migration classes, stub context, snapshot file) and what each is for.db-ef-migration add→dotnet ef database updatewalkthrough with a Marten-styleIDatabase.--contextusage, and the single-owner rule (a table is managed by exactly one migration stream; excluding critter-stack-managed tables from the app context viaIsTableExcludedFromMigrations).MapToTable→IDatabase→ generated migrations include projection tables automatically; ownership guidance.db-ef-migration baseline/ history backfill.Sql()blocks; nodotnet ef migrations add/removeagainst the stub context; EF 9PendingModelChangesWarningsuppression explained.Updates to existing docs
docs/efcore/migrations.md— position the two directions (Weasel-applies vs. EF-artifact generation) side by side.CLAUDE.md/EFCORE_IMPROVEMENTS.md— update capability lists and remove closed gaps.Downstream (tracked in their own repos, not here): short consumption pages for Marten, Polecat, and Wolverine.