Skip to content

[docs] Add Aspire.Hosting.EntityFrameworkCore hosting integration documentation#815

Closed
aspire-repo-bot[bot] wants to merge 2 commits intorelease/13.3from
docs/aspire-hosting-efcore-migrations-5f7a36167a36c9f5
Closed

[docs] Add Aspire.Hosting.EntityFrameworkCore hosting integration documentation#815
aspire-repo-bot[bot] wants to merge 2 commits intorelease/13.3from
docs/aspire-hosting-efcore-migrations-5f7a36167a36c9f5

Conversation

@aspire-repo-bot
Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#13481@Copilot

Targeting release/13.3 based on the source PR milestone 13.3 (which exists on microsoft/aspire.dev).

Why this PR is needed

microsoft/aspire#13481 introduces the Aspire.Hosting.EntityFrameworkCore NuGet package — a new AppHost hosting integration that manages EF Core database migrations. This is a significant new user-facing feature with no existing documentation on aspire.dev. The existing Apply EF Core migrations page covers only the manual migration worker service approach; it does not mention the new hosting integration.

What was added

New page: src/frontend/src/content/docs/integrations/databases/efcore/ef-migrations-hosting.mdx

Covers:

  • Installing Aspire.Hosting.EntityFrameworkCore in the AppHost
  • AddEFMigrations() — generic and string-based overloads, multiple DbContext types
  • RunDatabaseUpdateOnStart() — automatic migrations at startup with health check integration
  • WaitFor(migrations) — blocking dependent resources until migrations complete
  • PublishAsMigrationScript() and PublishAsMigrationBundle() — publish-time artifact generation
  • WithMigrationOutputDirectory and WithMigrationNamespace — customization options
  • WithMigrationsProject<T>() — separate migrations project support
  • Dashboard resource commands reference table (Update Database, Drop Database, Reset Database, Add Migration, Remove Migration, Get Database Status)

Sidebar update: src/frontend/config/sidebar/integrations.topics.ts

Added EF migrations hosting integration entry under the Entity Framework Core group, immediately after the existing Apply migrations entry.

Files modified

  • src/frontend/src/content/docs/integrations/databases/efcore/ef-migrations-hosting.mdx (new)
  • src/frontend/config/sidebar/integrations.topics.ts (updated)

This draft PR needs human review before merging, particularly to verify code examples against the final shipped API surface.

Generated by PR Documentation Check · ● 886.7K ·

Documents the new EF Core migrations hosting integration introduced in
microsoft/aspire#13481, including:

- AddEFMigrations extension method usage
- RunDatabaseUpdateOnStart with WaitFor support
- PublishAsMigrationScript and PublishAsMigrationBundle
- Dashboard resource commands reference
- WithMigrationsProject for separate migrations projects
- Sidebar entry under Entity Framework Core section

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label May 5, 2026
@@ -0,0 +1,181 @@
---
Copy link
Copy Markdown
Member

@AndriySvyryd AndriySvyryd May 5, 2026

Choose a reason for hiding this comment

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

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.

You're right — the AddEFMigrations content already exists in migrations.mdx from PR #774. I've removed the duplicate ef-migrations-hosting.mdx page and its sidebar entry in commit 58637b4. The PR now has no net changes vs. the base branch.

@IEvangelist
Copy link
Copy Markdown
Member

Hey @copilot, please update this PR. It looks like this is perhaps a duplicate of an existing doc that already came through for these changes. Have a look at src/frontend/src/content/docs/integrations/databases/efcore/migrations.mdx and reconcile this, either de-dup, or close this PR.

…sts in migrations.mdx)

Agent-Logs-Url: https://github.com/microsoft/aspire.dev/sessions/b593f89b-ce0d-4cb8-9574-f3ff93d35f53

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

Hey @copilot, please update this PR. It looks like this is perhaps a duplicate of an existing doc that already came through for these changes. Have a look at src/frontend/src/content/docs/integrations...

Done — I've removed the duplicate ef-migrations-hosting.mdx file and its sidebar entry (commit 58637b4). The AddEFMigrations content was already covered in migrations.mdx from PR #774, so this PR is now empty and can be closed.

Copilot AI requested a review from IEvangelist May 5, 2026 13:21
@IEvangelist IEvangelist closed this May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants