Complex type with sparse columns leads to incorrect migration code. #34578
Labels
area-migrations
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
Milestone
EF.Core Migrations generates incorrect code when using
IsSparse()
on a column of a complex type.The following configuration
leads to the following code generation
Which fails with the following error during compilation
cannot convert from 'Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexTypePropertyBuilder<string>' to 'Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder'
Include provider and version information
EF Core version: EF 8.0.8
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 8.0
Operating system: Visual Studio 2022
The text was updated successfully, but these errors were encountered: