private bool IsHookableEntry(HookedEntity entry)
        {
            var entity = entry.Entity;

            if (entity == null)
            {
                return(false);
            }

            return(IsHookableEntity(entity));
        }
Esempio n. 2
0
        public void OnBeforeSave(HookedEntity entry)
        {
            var entity = entry.Entity as TEntity;

            switch (entry.InitialState)
            {
            case EntityState.Added:
                OnInserting(entity, entry);
                break;

            case EntityState.Modified:
                OnUpdating(entity, entry);
                break;

            case EntityState.Deleted:
                OnDeleting(entity, entry);
                break;
            }
        }
Esempio n. 3
0
 protected virtual void OnDeleted(TEntity entity, HookedEntity entry)
 {
 }
Esempio n. 4
0
 protected virtual void OnUpdated(TEntity entity, HookedEntity entry)
 {
 }
Esempio n. 5
0
 protected virtual void OnInserted(TEntity entity, HookedEntity entry)
 {
 }