Skip to content

Document EF Core AppHost migration management - #1175

Closed
David Pine (IEvangelist) with Copilot wants to merge 1 commit into
mainfrom
copilot/133-document-aspire-hosting-entityframeworkcore
Closed

David Pine (IEvangelist) with Copilot wants to merge 1 commit into
mainfrom
copilot/133-document-aspire-hosting-entityframeworkcore

Conversation

Copilot AI commented Jun 2, 2026 •

Copy link
Copy Markdown
Contributor

Adds the 13.3 docs page for Aspire.Hosting.EntityFrameworkCore and 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

    • Added integrations/databases/efcore/efcore-host.mdx
    • Documents the AppHost-only role of Aspire.Hosting.EntityFrameworkCore
    • Covers:
      • AddEFMigrations usage
      • startup migration orchestration with RunDatabaseUpdateOnStart
      • ordering dependent apps with WaitForCompletion
      • migration resource configuration (WithMigrationsProject, output directory, namespace)
      • dashboard operations surfaced for EFMigrationResource
  • TypeScript parity

    • Included both C# and TypeScript AppHost samples because the package surface exists in the repo’s exported TS metadata
    • Kept examples aligned with the actual exported API shape
  • EF Core overview updates

    • Added a direct pointer from efcore/overview.mdx to the new AppHost page
    • Clarifies the distinction between:
      • EF Core client integrations in consuming apps
      • EF migration management modeled in the AppHost
  • Navigation and localization

    • Added the new page to the EF Core sidebar section
    • Added the ja mirror page with English placeholder content to match the repo’s localization flow

Example AppHost usage:

var api = builder.AddProject<Projects.Api>("api")
    .WithReference(db);

var migrations = api.AddEFMigrations("api-migrations", "MyApp.Data.AppDbContext")
    .RunDatabaseUpdateOnStart();

api.WaitForCompletion(migrations);

Copilot AI linked an issue Jun 2, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Document Aspire.Hosting.EntityFrameworkCore Document EF Core AppHost migration management Jun 2, 2026
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.
---

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also mention that the connection string shouldn't be configured during publish, see microsoft/aspire#17847 (comment)

@AndriySvyryd

Copy link
Copy Markdown
Member

David Pine (@IEvangelist) I can review this once you decide on the general structure for these docs

@IEvangelist
David Pine (IEvangelist) marked this pull request as ready for review June 30, 2026 08:38
Copilot AI review requested due to automatic review settings June 30, 2026 08:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-host page 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 ja mirror 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.
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1175. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1175 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

@aspire-repo-bot aspire-repo-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated wording suggestions from the forbidden-words check. Apply the suggestions to resolve them.

const horizontalWhitespace = String.raw`[ \t]+`;

// A deprecated term only matches when it isn't fused to an adjacent alphanumeric
// character, so longer tokens like `ASP.NET Aspire` or `.NET AspireX` stay intact

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use "Aspire" instead of ".NET Aspire".

Suggested change
// character, so longer tokens like `ASP.NET Aspire` or `.NET AspireX` stay intact
// character, so longer tokens like `ASPAspire` or `AspireX` stay intact

const termEnd = String.raw`(?![A-Za-z0-9])`;

// Markdown emphasis/link openers can sit between an article and a term in raw
// README content (e.g. `a **.NET Aspire**`, `a [.NET Aspire](url)`, or

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use "Aspire" instead of ".NET Aspire".

Suggested change
// README content (e.g. `a **.NET Aspire**`, `a [.NET Aspire](url)`, or
// README content (e.g. `a **Aspire**`, `a [Aspire](url)`, or


// Markdown emphasis/link openers can sit between an article and a term in raw
// README content (e.g. `a **.NET Aspire**`, `a [.NET Aspire](url)`, or
// `a _.NET Aspire_`), so the article corrector consumes them to stay grammatical

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use "Aspire" instead of ".NET Aspire".

Suggested change
// `a _.NET Aspire_`), so the article corrector consumes them to stay grammatical
// `a _Aspire_`), so the article corrector consumes them to stay grammatical

const markdownOpeners = String.raw`[*\[_]*`;

// Fenced code blocks and inline code spans are copied through verbatim so sample
// commands like `dotnet aspire run` are never rewritten into an unrunnable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use "Aspire" instead of "dotnet aspire".

Suggested change
// commands like `dotnet aspire run` are never rewritten into an unrunnable
// commands like `Aspire run` are never rewritten into an unrunnable

* Case-insensitive regex source matching the deprecated term core, without
* boundaries. Use `${horizontalWhitespace}` for internal spaces; alphanumeric
* boundaries are applied automatically so a rule can never corrupt a longer
* token like `ASP.NET Aspire` or `.NET AspireX`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use "Aspire" instead of ".NET Aspire".

Suggested change
* token like `ASP.NET Aspire` or `.NET AspireX`.
* token like `ASPAspire` or `AspireX`.

/**
* Indefinite article the replacement should take. Set this only when the
* replacement's leading sound differs from the term's, so a preceding `a`/`an`
* is corrected (e.g. `a .NET Aspire` -> `an Aspire`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use "Aspire" instead of ".NET Aspire".

Suggested change
* is corrected (e.g. `a .NET Aspire` -> `an Aspire`).
* is corrected (e.g. `a Aspire` -> `an Aspire`).

seoTitle: Bun integration for Aspire AppHost (Community Toolkit)
description: Learn how to use the Aspire Community Toolkit Bun hosting integration to orchestrate Bun applications alongside other resources in the Aspire app host.
seoTitle: Bun integration for Aspire AppHost
description: Learn how to use the Aspire.Hosting.JavaScript Bun hosting APIs to orchestrate Bun applications alongside other resources in the Aspire app host.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use "AppHost" instead of "app host".

Suggested change
description: Learn how to use the Aspire.Hosting.JavaScript Bun hosting APIs to orchestrate Bun applications alongside other resources in the Aspire app host.
description: Learn how to use the Aspire.Hosting.JavaScript Bun hosting APIs to orchestrate Bun applications alongside other resources in the Aspire AppHost.

['uppercase article', `A ${legacyDotnetAspireName} sample`, 'An Aspire sample'],
['lowercase article', `Build a ${legacyDotnetAspireName} sample`, 'Build an Aspire sample'],
['no article', `Deploy the ${legacyDotnetAspireName} app`, 'Deploy the Aspire app'],
])('normalizes the "dotnet aspire" spelling (%s)', (_scenario, input, expected) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use "Aspire" instead of "dotnet aspire".

Suggested change
])('normalizes the "dotnet aspire" spelling (%s)', (_scenario, input, expected) => {
])('normalizes the "Aspire" spelling (%s)', (_scenario, input, expected) => {

test('normalizes prose while preserving adjacent code', () => {
const input = `Build a ${legacyAspireName} app, then run \`${legacyDotnetAspireName} run\`.`;
expect(normalizeAspireTerminology(input)).toBe(
'Build an Aspire app, then run `dotnet aspire run`.'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use "Aspire" instead of "dotnet aspire".

Suggested change
'Build an Aspire app, then run `dotnet aspire run`.'
'Build an Aspire app, then run `Aspire run`.'

@IEvangelist David Pine (IEvangelist) added the ci:skip-forbidden-words Allows maintainers to bypass false positives in the forbidden-word check. label Aug 7, 2026
Add the AppHost migration management reference and link it from the EF Core overview and integration sidebar.

Co-authored-by: Copilot App <[email protected]>
@IEvangelist David Pine (IEvangelist) removed the ci:skip-forbidden-words Allows maintainers to bypass false positives in the forbidden-word check. label Aug 7, 2026
@IEvangelist
David Pine (IEvangelist) force-pushed the copilot/133-document-aspire-hosting-entityframeworkcore branch from fd1c9c7 to 6b6c26a Compare August 7, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[13.3] Document Aspire.Hosting.EntityFrameworkCore

5 participants