From 577bd4e46f29a33a0c8e5b854f592ef160b3c8cd Mon Sep 17 00:00:00 2001 From: Andriy Svyryd Date: Fri, 4 Oct 2024 17:19:54 -0700 Subject: [PATCH 1/2] Add missed 8.0 breaking changes. --- .../ef-core-8.0/breaking-changes.md | 42 ++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/entity-framework/core/what-is-new/ef-core-8.0/breaking-changes.md b/entity-framework/core/what-is-new/ef-core-8.0/breaking-changes.md index b3a7cdfe53..6dcbe064c1 100644 --- a/entity-framework/core/what-is-new/ef-core-8.0/breaking-changes.md +++ b/entity-framework/core/what-is-new/ef-core-8.0/breaking-changes.md @@ -2,7 +2,7 @@ title: Breaking changes in EF Core 8.0 (EF8) - EF Core description: Complete list of breaking changes introduced in Entity Framework Core 8.0 (EF8) author: ajcvickers -ms.date: 12/18/2023 +ms.date: 10/04/2024 uid: core/what-is-new/ef-core-8.0/breaking-changes --- @@ -34,6 +34,8 @@ EF Core 8 targets .NET 8. Applications targeting older .NET, .NET Core, and .NET | [Scaffolding may generate different navigation names](#navigation-names) | Low | | [Discriminators now have a max length](#discriminators) | Low | | [SQL Server key values are compared case-insensitively](#casekeys) | Low | +| [Multiple AddDbContext calls are applied in different order](#AddDbContext) | Low | +| [EntityTypeAttributeConventionBase replaced with TypeAttributeConventionBase](#attributeConventionBase) | Low | ## High-impact changes @@ -533,3 +535,41 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) }); } ``` + + + +### Multiple AddDbContext calls are applied in different order + +[Tracking Issue #32518](https://github.com/dotnet/efcore/issues/32518) + +#### Old behavior + +Previously, when multiple calls to `AddDbContext`, `AddDbContextPool`, `AddDbContextFactory` or `AddPooledDbContextFactor` were made with the same context type but conflicting configuration the first one won. + +#### New behavior + +Starting with EF Core 8.0, the configuration from the last call one will take precedence. + +#### Why + +This was changed to be consistent with the new method `ConfigureDbContext` that can be used to add configuration either before or after the `Add*` methods. + +#### Mitigations + +Reverse the order of `Add*` calls. + + + +### EntityTypeAttributeConventionBase replaced with TypeAttributeConventionBase + +#### New behavior + +In EF Core 8.0 `EntityTypeAttributeConventionBase` was renamed to `TypeAttributeConventionBase`. + +#### Why + +`TypeAttributeConventionBase` represents the functionality better as it now can be used for complex types as well as entity types. + +#### Mitigations + +Replace `EntityTypeAttributeConventionBase` usages with `TypeAttributeConventionBase`. From a66ac840f1edb095bf934068f5c7ec4c3591ffc1 Mon Sep 17 00:00:00 2001 From: Andriy Svyryd Date: Wed, 16 Oct 2024 13:42:46 -0700 Subject: [PATCH 2/2] Update ToC PR feedback --- .../core/what-is-new/ef-core-8.0/breaking-changes.md | 4 ++-- entity-framework/toc.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/entity-framework/core/what-is-new/ef-core-8.0/breaking-changes.md b/entity-framework/core/what-is-new/ef-core-8.0/breaking-changes.md index 6dcbe064c1..f5fac2ae13 100644 --- a/entity-framework/core/what-is-new/ef-core-8.0/breaking-changes.md +++ b/entity-framework/core/what-is-new/ef-core-8.0/breaking-changes.md @@ -544,7 +544,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) #### Old behavior -Previously, when multiple calls to `AddDbContext`, `AddDbContextPool`, `AddDbContextFactory` or `AddPooledDbContextFactor` were made with the same context type but conflicting configuration the first one won. +Previously, when multiple calls to `AddDbContext`, `AddDbContextPool`, `AddDbContextFactory` or `AddPooledDbContextFactor` were made with the same context type but conflicting configuration, the first one won. #### New behavior @@ -568,7 +568,7 @@ In EF Core 8.0 `EntityTypeAttributeConventionBase` was renamed to `TypeAttribute #### Why -`TypeAttributeConventionBase` represents the functionality better as it now can be used for complex types as well as entity types. +`TypeAttributeConventionBase` represents the functionality better as it now can be used for complex types and entity types. #### Mitigations diff --git a/entity-framework/toc.yml b/entity-framework/toc.yml index aaf1079e93..ddeb8ef434 100644 --- a/entity-framework/toc.yml +++ b/entity-framework/toc.yml @@ -32,10 +32,10 @@ items: - name: Welcome! href: core/index.md - - name: "What's new in EF Core 8.0" - href: core/what-is-new/ef-core-8.0/whatsnew.md - - name: "Breaking changes in EF Core 8.0" - href: core/what-is-new/ef-core-8.0/breaking-changes.md + - name: "What's new in EF Core 9.0" + href: core/what-is-new/ef-core-9.0/whatsnew.md + - name: "Breaking changes in EF Core 9.0" + href: core/what-is-new/ef-core-9.0/breaking-changes.md - name: Getting started items: - name: EF Core Overview