Efcore: Changes to owned notification entities may not get detected automatically

Created on 8 Feb 2020  ·  12Comments  ·  Source: dotnet/efcore


Hello.I use EF Core in WPF to implement MVVM pattern, but I think there is a problem in Saving New Created Related Entities .
I Load Parent and It's related children Entities from Database using Include , Load ,Local and ToObservableCollection to use them in WPF (MVVM pattern). No Problem until here. When I create a new Child Entity and a new Parent Entity and then I add new Child Entity to Parent's collection , the new added Child Entity is not tracked by ChangeTracker and so the new child isn't saved to Database when DbContext.SaveChanges is Callled.

In Fact, I think new added Child Entites should be saved in database with it's Parent after calling DbContext.SaveChanges , but it doesn't happen.

Steps to reproduce