From 6c682f7a2af5de626645ff540edfc343b139567a Mon Sep 17 00:00:00 2001 From: Andriy Svyryd Date: Thu, 5 Mar 2026 21:42:32 -0800 Subject: [PATCH 1/4] Update recommendation for separate migrations projects Clarify recommendation for using separate migrations projects for platform-specific cases. --- entity-framework/core/managing-schemas/migrations/projects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entity-framework/core/managing-schemas/migrations/projects.md b/entity-framework/core/managing-schemas/migrations/projects.md index a306bde830..3dbc12bad8 100644 --- a/entity-framework/core/managing-schemas/migrations/projects.md +++ b/entity-framework/core/managing-schemas/migrations/projects.md @@ -8,7 +8,7 @@ uid: core/managing-schemas/migrations/projects # Using a Separate Migrations Project -You may want to store your migrations in a different project than the one containing your `DbContext`. You can also use this strategy to maintain multiple sets of migrations, for example, one for development and another for release-to-release upgrades. +You may want to store your migrations in a different project than the one containing your `DbContext`. This is recommended if your project is platform-specifc, since EF tools don't support these projects. You can also use this strategy to maintain multiple sets of migrations, for example, one for development and another for release-to-release upgrades. > [!TIP] > You can view this article's [sample on GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Schemas/ThreeProjectMigrations). From fd8159432663e51ee8b567b7163311790a765b0e Mon Sep 17 00:00:00 2001 From: Andriy Svyryd Date: Thu, 5 Mar 2026 21:45:36 -0800 Subject: [PATCH 2/4] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- entity-framework/core/managing-schemas/migrations/projects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entity-framework/core/managing-schemas/migrations/projects.md b/entity-framework/core/managing-schemas/migrations/projects.md index 3dbc12bad8..6d9f101a14 100644 --- a/entity-framework/core/managing-schemas/migrations/projects.md +++ b/entity-framework/core/managing-schemas/migrations/projects.md @@ -8,7 +8,7 @@ uid: core/managing-schemas/migrations/projects # Using a Separate Migrations Project -You may want to store your migrations in a different project than the one containing your `DbContext`. This is recommended if your project is platform-specifc, since EF tools don't support these projects. You can also use this strategy to maintain multiple sets of migrations, for example, one for development and another for release-to-release upgrades. +You may want to store your migrations in a different project than the one containing your `DbContext`. This is recommended if your project is platform-specific, since EF tools don't support these projects. You can also use this strategy to maintain multiple sets of migrations, for example, one for development and another for release-to-release upgrades. > [!TIP] > You can view this article's [sample on GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Schemas/ThreeProjectMigrations). From 54c23eb56c9737a32a7c15786b9c1b96fcd6ff98 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Mar 2026 00:04:35 +0000 Subject: [PATCH 3/4] Clarify platform-specific project types and add IDesignTimeDbContextFactory tip Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/EntityFramework.Docs/sessions/c5e63b10-86cb-4d7a-acea-ce2442934830 --- .../core/managing-schemas/migrations/projects.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/entity-framework/core/managing-schemas/migrations/projects.md b/entity-framework/core/managing-schemas/migrations/projects.md index 6d9f101a14..87d05c3e9a 100644 --- a/entity-framework/core/managing-schemas/migrations/projects.md +++ b/entity-framework/core/managing-schemas/migrations/projects.md @@ -8,7 +8,7 @@ uid: core/managing-schemas/migrations/projects # Using a Separate Migrations Project -You may want to store your migrations in a different project than the one containing your `DbContext`. This is recommended if your project is platform-specific, since EF tools don't support these projects. You can also use this strategy to maintain multiple sets of migrations, for example, one for development and another for release-to-release upgrades. +You may want to store your migrations in a different project than the one containing your `DbContext`. This is recommended if your project uses a platform-specific project type that the EF tools don't support, such as WinUI, Xamarin, MAUI, Blazor, or Azure Functions, or if it targets a specific runtime identifier (RID). You can also use this strategy to maintain multiple sets of migrations, for example, one for development and another for release-to-release upgrades. > [!TIP] > You can view this article's [sample on GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Schemas/ThreeProjectMigrations). @@ -59,3 +59,6 @@ Add-Migration NewMigration -Project WebApplication1.Migrations ``` *** + +> [!TIP] +> If your application uses dependency injection, consider implementing in your migrations project. This allows the EF tools to create your `DbContext` without needing to run the startup project. For more information, see [From a design-time factory](xref:core/cli/dbcontext-creation#from-a-design-time-factory). From a0e408bd0dd4f27f04b7d175566eae110acc4290 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Mar 2026 00:10:31 +0000 Subject: [PATCH 4/4] Apply wording suggestion for platform-specific project types sentence Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/EntityFramework.Docs/sessions/ee79bd9d-1ee7-4b28-afe6-b524396ea52d --- entity-framework/core/managing-schemas/migrations/projects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entity-framework/core/managing-schemas/migrations/projects.md b/entity-framework/core/managing-schemas/migrations/projects.md index 87d05c3e9a..657459747e 100644 --- a/entity-framework/core/managing-schemas/migrations/projects.md +++ b/entity-framework/core/managing-schemas/migrations/projects.md @@ -8,7 +8,7 @@ uid: core/managing-schemas/migrations/projects # Using a Separate Migrations Project -You may want to store your migrations in a different project than the one containing your `DbContext`. This is recommended if your project uses a platform-specific project type that the EF tools don't support, such as WinUI, Xamarin, MAUI, Blazor, or Azure Functions, or if it targets a specific runtime identifier (RID). You can also use this strategy to maintain multiple sets of migrations, for example, one for development and another for release-to-release upgrades. +You may want to store your migrations in a different project than the one containing your `DbContext`. This is recommended if your project uses a platform-specific project type, such as WinUI, Xamarin, MAUI, Blazor, or Azure Functions, or if it targets a specific runtime identifier (RID). You can also use this strategy to maintain multiple sets of migrations, for example, one for development and another for release-to-release upgrades. > [!TIP] > You can view this article's [sample on GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Schemas/ThreeProjectMigrations).