Category "savechanges"

Using EF Core with WPF and I'd like to revert to initial state when a user press Cancel instead of OK on a dialog, is that possible and how?

I'm using EF Core with WPF and I'd like to revert any changes done on any objects to their initial state when a user press Cancel instead of OK on a dialog, is

why dbcontext.savechanges() donot clear tracked entites of this dbcontext in efcore

I have an error on update entities use efcore and automapper: Entity cannot be tracked because another instance is with the same key value I saw some answers an