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.
- Host: GitHub
- URL: https://github.com/dwarry/efcoreseedissuerepro
- Owner: dwarry
- Created: 2018-10-13T07:30:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-13T07:51:10.000Z (over 7 years ago)
- Last Synced: 2025-01-24T11:28:50.616Z (over 1 year ago)
- Language: C#
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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