static void AttachInvalidationsDependant <T>(Schema s, Action action) where T : Entity { var ee = s.EntityEvents <T>(); ee.Saving += e => { if (!e.IsNew && e.IsGraphModified) { action(); } }; ee.PreUnsafeUpdate += (u, q) => action(); }
static void AttachInvalidations <T>(Schema s, Action action) where T : Entity { var ee = s.EntityEvents <T>(); ee.Saving += e => { if (e.IsGraphModified) { action(); } }; ee.PreUnsafeUpdate += (u, eq) => action(); ee.PreUnsafeDelete += (q) => action(); }