public virtual void AfterDelete() { Type superClass = Reflections.GetBaseType(this.GetType()); if (superClass != typeof(PersistentEntity)) { PersistentEntity superObject = ((PersistentEntity)Reflections.GetSuperInstanceFromInstance(this)); superObject.Delete(); } }
public virtual bool BeforeUpdate() { Type superClass = Reflections.GetBaseType(this.GetType()); if (superClass != typeof(PersistentEntity)) { PersistentEntity superObject = ((PersistentEntity)Reflections.GetSuperInstanceFromInstance(this)); if (superObject.Update()) { this.SetId(superObject.GetId()); return(true); } else { return(false); } } return(true); }