You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicvoidTriggerCallbackWhenDeleted(){vartransactor= CreateServices(s => s.Decorate<ITransactor,OnDeleteTransactor>()).GetRequiredService<ITransactor>();varwasDeleted= transactor.Transact(db =>{varp= db.Insert<Person>();vardeleted=false; p.WhenDeleted(p =>deleted=true); db.Delete(p);returndeleted;});
Assert.True(wasDeleted);wasDeleted= transactor.Transact(db =>{varp= db.Insert<Person>();vardeleted=false; p.WhenDeleted(p =>deleted=true);// The WhenDeleted method is not called,// because DbProxy.GetContext returns the original not decorated `IDatabaseContext`.db= DbProxy.GetContext(p); db.Delete(p);returndeleted;});// This fails.
Assert.True(wasDeleted);}
The text was updated successfully, but these errors were encountered:
Reported by @Dhaigvip.
A simple scenario to reproduce the issue:
The text was updated successfully, but these errors were encountered: