Replacing Owned Entity that contains an enum value with .HasConversion<string> throws exception during SaveChanges #28763
Labels
area-save-changes
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
regression
type-bug
Milestone
After upgrading to preview versions of 7.0, I started encountering InvalidCastExceptions when saving changes to some of my entities. The specific scenario appears to be:
This all worked fine in EF Core 6.0 and 7.0.0-preview.3.22175.1. Preview 4 and beyond exhibit the issue.
Here is a runnable example to demonstrate.
Include stack traces
Exception message and stack trace
Provider and version information
EF Core version: 7.0.0-preview.4.22229.2 - 7.0.0-preview.7.22376.2
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 6.0
Operating system: Windows 10
IDE: Visual Studio 2022 17.3.0
The text was updated successfully, but these errors were encountered: