Question: how to resolve this error:
Microsoft.EntityFrameworkCore.DbUpdateException: Required properties '{'Prop1', 'Prop2'}' are missing for the instance of entity type 'SomeEntity' with the key value '{Id: 1}'
I have a test suite that uses the EF Core in-memory provider. I recently upgraded all EF Core NuGet packages in the solution to target version 6.0.1.
When running some of the tests post-upgrade, I encountered the error mentioned above.
Both of the properties mentioned in the error are strings.
I've reviewed some Github issues and Stack Overflow posts that the search engine hit on when DuckDuckGo'ing the error message, but this didn't turn up anything interesting.
The affected class has a config method like this:
public void Configure(EntityTypeBuilder<SomeType> builder)
{
builder
.Property(someType => someType.Prop1)
.IsRequired();
builder
.Property(someType => someType.Prop2)
.IsRequired();
}