HasData with an empty array property #20432
Labels
area-type-mapping
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
Let's say we have the following model.
The array is non-nullable and hence we have to provide some value. For simplicity, I initialized the array on the property level. When attempting to seed users, the generated migration uses
new [] {}
syntax and since the array is empty the compiler cannot infer the type and compilation/migration application fails.Further technical details
EF Core version: 3.1.2
Database provider: Npgsql.EntityFrameworkCore.PostgreSQL
Target framework: .NET Core 3.1
Operating system: Windows 10
IDE: Visual Studio 2019 16.5.1
The text was updated successfully, but these errors were encountered: