How do I properly create owned entities in migration?

时间:2019-03-19 14:55:59

标签: entity-framework-core ef-migrations ef-core-2.2

I added owned entity which is mapped to another table. Property is marked as required.

How and where do I create default entries for all existing principal entities as a part of migration step?

Update:

At least EF Core is clever enough to not override property initialisation with null which is coming from DB as a result of owned entity absence.

0 个答案:

没有答案