예제 #1
0
 /// <summary>
 /// Reads the specified defined type model.
 /// </summary>
 /// <param name="workflowActivityTypeModel">The defined type model.</param>
 /// <param name="rockContext">The rock context.</param>
 /// <returns></returns>
 public static WorkflowActivityTypeCache Read(WorkflowActivityType workflowActivityTypeModel, RockContext rockContext = null)
 {
     return(GetOrAddExisting(WorkflowActivityTypeCache.CacheKey(workflowActivityTypeModel.Id),
                             () => LoadByModel(workflowActivityTypeModel)));
 }
예제 #2
0
 /// <summary>
 /// Returns WorkflowActivityType object from cache.  If workflowActivityType does not already exist in cache, it
 /// will be read and added to cache
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="rockContext">The rock context.</param>
 /// <returns></returns>
 public static WorkflowActivityTypeCache Read(int id, RockContext rockContext = null)
 {
     return(GetOrAddExisting(WorkflowActivityTypeCache.CacheKey(id),
                             () => LoadById(id, rockContext)));
 }