Exemple #1
0
        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();
        }
Exemple #2
0
        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();
        }