Пример #1
0
        public static void RaiseOnDeleting(IEntity record, CancelEventArgs args)
        {
            if (record == null)
            {
                throw new ArgumentNullException("record");
            }

            InstanceDeleting?.Invoke(record, args);

            if (args.Cancel)
            {
                return;
            }

            (record as Entity).OnDeleting(args);
        }
Пример #2
0
 internal static Task OnInstanceDeleting(CancelEventArgs args) => InstanceDeleting.Raise(args);