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); }
internal static Task OnInstanceDeleting(CancelEventArgs args) => InstanceDeleting.Raise(args);