<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/jaliya-s-blog-ef-core-11-0-what-s-new-with-migrations-mulk2fcy0" -->

---
title: Jaliya's Blog: EF Core 11.0: What's New with Migrations
description: EF Core 11.0, released alongside .NET 11 Release Candidate 1, introduces several migration improvements: a new ExcludeForeignKeyFromMigrations() method to omit...
canonical: https://daily.dev/posts/jaliya-s-blog-ef-core-11-0-what-s-new-with-migrations-mulk2fcy0
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Jaliya's Blog: EF Core 11.0: What's New with Migrations | daily.dev
og:description: EF Core 11.0, released alongside .NET 11 Release Candidate 1, introduces several migration improvements: a new ExcludeForeignKeyFromMigrations() method to omit...
og:url: https://daily.dev/posts/jaliya-s-blog-ef-core-11-0-what-s-new-with-migrations-mulk2fcy0
og:image: https://api.daily.dev/og/posts/MULK2FCy0.png
og:image:alt: Jaliya's Blog: EF Core 11.0: What's New with Migrations
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Jaliya's Blog: EF Core 11.0: What's New with Migrations

**[We Are .NET](https://daily.dev/sources/wearedotnet)** · 5 min read · 0 upvotes · 0 comments

## Summary

EF Core 11.0, released alongside .NET 11 Release Candidate 1, introduces several migration improvements: a new ExcludeForeignKeyFromMigrations() method to omit foreign key constraints while still creating the index; a new --add option for dotnet ef database update (and -Add for Update-Database in Package Manager Console) that scaffolds, compiles, and applies a migration in one step; and new --connection and --offline options for dotnet ef migrations remove and dotnet ef database drop, letting developers specify a connection string directly or skip the database check entirely (though --offline and --force cannot be combined). Additional smaller changes include recording the latest migration ID in the model snapshot, a dotnet ef configuration file, -NoBuild for PMC commands, and wildcard context support.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://jaliyaudagedara.blogspot.com/2026/09/ef-core-110-whats-new-with-migrations.html>

## Questions this post answers

### How do I exclude a foreign key constraint from an EF Core migration?

Call ExcludeForeignKeyFromMigrations() at the end of the relationship configuration in OnModelCreating, available starting with EF Core 11.0. This prevents the generated migration from creating a FOREIGN KEY constraint on that relationship, while still creating an index on the foreign key column, and querying with Include still works via a JOIN.

_Developers tightening migration output can track EF Core changes like this via daily.dev._

### How can I create and apply an EF Core migration in a single command?

Run dotnet ef database update with the new --add option, for example 'dotnet ef database update InitialCreate --add', introduced in EF Core 11.0. It scaffolds the migration, compiles it at runtime using Roslyn, and applies it to the database in one step. In Package Manager Console, use Update-Database -Migration InitialCreate -Add.

_Teams streamlining migration workflows can follow EF Core tooling updates on daily.dev._

### How do I remove an EF Core migration without connecting to the database?

Use the new --offline option with dotnet ef migrations remove, introduced in EF Core 11.0, which skips the check that normally connects to the database to verify whether the migration was applied. This is useful when the database is unreachable or you already know the migration hasn't been applied. Note that --offline cannot be combined with --force, since --force requires a database connection to revert an applied migration.

_Developers troubleshooting migration cleanup can keep up with EF Core CLI changes via daily.dev._

## Similar posts on daily.dev

- [EF Core Plugins: Owning Migrations with ExcludeFromMigrations — Daily DevOps & .NET](https://daily.dev/posts/ef-core-plugins-owning-migrations-with-excludefrommigrations-daily-devops-net-nrbwcbzmy) · Daily DevOps & .NET · 0 upvotes · 0 comments
- [EF Core 11 makes your split queries faster](https://daily.dev/posts/ef-core-11-makes-your-split-queries-faster-t9ltozeyp) · We Are .NET · 22 upvotes · 1 comments
- [EF Core Migration Bundles: What They Are & Why They Matter](https://daily.dev/posts/ef-core-migration-bundles-what-they-are-why-they-matter-xq9wcjnhr) · Medium · 0 upvotes · 0 comments
- [Microsoft Releases .NET 11 Preview 6 With Language and Framework Updates](https://daily.dev/posts/microsoft-releases-net-11-preview-6-with-language-and-framework-updates-oqwjdzv3l) · InfoQ · 7 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#.net](https://daily.dev/tags/.net), [#c#](https://daily.dev/tags/c#), [#microsoft-sql-server](https://daily.dev/tags/microsoft-sql-server)

[View this post on daily.dev](https://daily.dev/posts/jaliya-s-blog-ef-core-11-0-what-s-new-with-migrations-mulk2fcy0)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Jaliya's Blog: EF Core 11.0: What's New with Migrations","url":"https://daily.dev/posts/jaliya-s-blog-ef-core-11-0-what-s-new-with-migrations-mulk2fcy0","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/jaliya-s-blog-ef-core-11-0-what-s-new-with-migrations-mulk2fcy0"},"datePublished":"2026-09-11T23:16:27.797Z","dateModified":"2026-09-18T08:37:54.302Z","description":"EF Core 11.0, released alongside .NET 11 Release Candidate 1, introduces several migration improvements: a new ExcludeForeignKeyFromMigrations() method to omit...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"We Are .NET","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"We Are .NET","logo":"https://media.daily.dev/image/upload/s--BsnVOa3i--/f_auto/v1718347410/logos/wearedotnet","url":"https://daily.dev/sources/wearedotnet"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/jaliya-s-blog-ef-core-11-0-what-s-new-with-migrations-mulk2fcy0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"database,.net,c#,microsoft-sql-server","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"We Are .NET","item":"https://daily.dev/sources/wearedotnet"},{"@type":"ListItem","position":3,"name":"Jaliya's Blog: EF Core 11.0: What's New with Migrations"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/jaliya-s-blog-ef-core-11-0-what-s-new-with-migrations-mulk2fcy0#faq","mainEntity":[{"@type":"Question","name":"How do I exclude a foreign key constraint from an EF Core migration?","acceptedAnswer":{"@type":"Answer","text":"Call ExcludeForeignKeyFromMigrations() at the end of the relationship configuration in OnModelCreating, available starting with EF Core 11.0. This prevents the generated migration from creating a FOREIGN KEY constraint on that relationship, while still creating an index on the foreign key column, and querying with Include still works via a JOIN. Developers tightening migration output can track EF Core changes like this via daily.dev."}},{"@type":"Question","name":"How can I create and apply an EF Core migration in a single command?","acceptedAnswer":{"@type":"Answer","text":"Run dotnet ef database update with the new --add option, for example 'dotnet ef database update InitialCreate --add', introduced in EF Core 11.0. It scaffolds the migration, compiles it at runtime using Roslyn, and applies it to the database in one step. In Package Manager Console, use Update-Database -Migration InitialCreate -Add. Teams streamlining migration workflows can follow EF Core tooling updates on daily.dev."}},{"@type":"Question","name":"How do I remove an EF Core migration without connecting to the database?","acceptedAnswer":{"@type":"Answer","text":"Use the new --offline option with dotnet ef migrations remove, introduced in EF Core 11.0, which skips the check that normally connects to the database to verify whether the migration was applied. This is useful when the database is unreachable or you already know the migration hasn't been applied. Note that --offline cannot be combined with --force, since --force requires a database connection to revert an applied migration. Developers troubleshooting migration cleanup can keep up with EF Core CLI changes via daily.dev."}}]}
```

