I'm trying to add some seed data to my model using .HasData in order to populate my database. I use ID 0 within my data model to map to unknown on each table.
When trying to run the application once adding this, I get the following error:
The seed entity for entity type 'DboTable' cannot be added because there was no value provided for the required property 'Id'.
I assumed that EFCore forces a value of null since a integer of 0 is equivalent to null, but when I try to force an integer parse, it still throws the same error.
At this point I'm unsure of how to approach this, any advice would be appreciated.
snippit from DbContext.cs
...
entity.HasData(new DboTable()
{
Id = 0, // integer
Label = "UNKNOWN", // string
...
});
...