An open API service indexing awesome lists of open source software.

https://github.com/dwarry/efcoreseedissuerepro

Minimal reproduction of the issue where seeding data fails if an Owned Entity is initialized by the parent class.
https://github.com/dwarry/efcoreseedissuerepro

Last synced: 8 months ago
JSON representation

Minimal reproduction of the issue where seeding data fails if an Owned Entity is initialized by the parent class.

Awesome Lists containing this project

README

          

# EFCoreSeedIssueRepro
Minimal reproduction of the issue where seeding data fails if an Owned Entity is initialized by the parent class. See https://github.com/aspnet/EntityFrameworkCore/issues/13614

In `Domain.cs` there is a normal EF persistent entity which has an Owned Entity property. Seeding fails because the
Owned Entity is being initialized; it appears this is overwriting the values being set by EF. Comment out line 14 of
`Domain.cs` and it works as you'd expect.

This was found in EF Core v2.1.4