Document EF Core AppHost migration management#1175
Document EF Core AppHost migration management#1175IEvangelist with Copilot wants to merge 3 commits into
Conversation
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
| title: Set up EF Core migration management in the AppHost | ||
| description: Learn how to use Aspire.Hosting.EntityFrameworkCore to model EF Core migrations, dashboard commands, and startup or publish workflows from your AppHost. | ||
| --- | ||
|
|
There was a problem hiding this comment.
I don't think it makes sense to document this in one way here and in another in https://github.com/microsoft/aspire.dev/blob/main/src/frontend/src/content/docs/integrations/databases/efcore/migrations.mdx#automated-ef-migrations-with-addefmigrations
There was a problem hiding this comment.
Also mention that the connection string shouldn't be configured during publish, see microsoft/aspire#17847 (comment)
|
@IEvangelist I can review this once you decide on the general structure for these docs |
There was a problem hiding this comment.
Pull request overview
This PR adds a new EF Core documentation page focused on AppHost-side EF Core migration management via Aspire.Hosting.EntityFrameworkCore, and connects it into the EF Core docs and sidebar navigation. It also introduces a Japanese locale mirror page (currently English placeholder content) consistent with the repo’s localization workflow.
Changes:
- Added a new
efcore-hostpage documenting AppHost modeling of EF migrations, including dashboard operations and startup/publish workflows (C# + TypeScript samples). - Updated the EF Core overview to link to the new AppHost migration-management page and clarify AppHost vs consuming-app responsibilities.
- Wired the new page into the Integrations sidebar EF Core section; added a
jamirror page.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/frontend/src/content/docs/ja/integrations/databases/efcore/efcore-host.mdx | Adds the Japanese-locale mirror page (English placeholder) for the new EF Core AppHost migration management doc. |
| src/frontend/src/content/docs/integrations/databases/efcore/overview.mdx | Adds a pointer to the new AppHost migration-management page and improves formatting/clarity. |
| src/frontend/src/content/docs/integrations/databases/efcore/efcore-host.mdx | Adds the new EF Core AppHost migration management documentation page (C# + TypeScript). |
| src/frontend/config/sidebar/integrations.topics.ts | Adds the new EF Core AppHost page to the EF Core sidebar navigation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| data-zoom-off | ||
| /> | ||
|
|
||
| This article is the AppHost reference for [`Aspire.Hosting.EntityFrameworkCore`](https://www.nuget.org/packages/Aspire.Hosting.EntityFrameworkCore). Unlike the existing EF Core database pages, which focus on registering a `DbContext` inside a consuming .NET app, this package lives in the [`AppHost`](/get-started/app-host/) and models EF Core migration management for a project resource. It doesn't provision a database or replace the per-database EF Core client packages — instead, it adds a provider-agnostic EF Core migration resource that you can orchestrate alongside your existing database and app resources. |
Adds the 13.3 docs page for
Aspire.Hosting.EntityFrameworkCoreand wires it into the EF Core docs set. This documents the AppHost-side EF migration model separately from the existing per-database EF Core client integration pages.New EF Core AppHost page
integrations/databases/efcore/efcore-host.mdxAspire.Hosting.EntityFrameworkCoreAddEFMigrationsusageRunDatabaseUpdateOnStartWaitForCompletionWithMigrationsProject, output directory, namespace)EFMigrationResourceTypeScript parity
EF Core overview updates
efcore/overview.mdxto the new AppHost pageNavigation and localization
jamirror page with English placeholder content to match the repo’s localization flowExample AppHost usage: