/// <summary> /// Updates any Cache Objects that are associated with this entity /// </summary> /// <param name="entityState">State of the entity.</param> /// <param name="dbContext">The database context.</param> public void UpdateCache(System.Data.Entity.EntityState entityState, Rock.Data.DbContext dbContext) { var workflowTypeId = WorkflowActivityTypeCache.Get(this.ActivityTypeId, dbContext as RockContext)?.WorkflowTypeId; if (workflowTypeId.HasValue) { WorkflowTypeCache.UpdateCachedEntity(workflowTypeId.Value, System.Data.Entity.EntityState.Modified); } WorkflowActivityTypeCache.UpdateCachedEntity(this.ActivityTypeId, System.Data.Entity.EntityState.Modified); WorkflowActionTypeCache.UpdateCachedEntity(this.Id, entityState); }
/// <summary> /// Updates any Cache Objects that are associated with this entity /// </summary> /// <param name="entityState">State of the entity.</param> /// <param name="dbContext">The database context.</param> public void UpdateCache(EntityState entityState, Data.DbContext dbContext) { WorkflowTypeCache.UpdateCachedEntity(this.WorkflowTypeId, EntityState.Modified); WorkflowActivityTypeCache.UpdateCachedEntity(this.Id, entityState); }