public IPageOfItems <ScheduleItem> GetScheduleItemsByTag(Event evnt, Tag tag, ScheduleItemFilterCriteria scheduleItemFilterCriteria) { return (cache.GetItems <IPageOfItems <ScheduleItem>, ScheduleItem>( string.Format("GetScheduleItems-Event:{0},Tag:{1:N},FilterCriteria:{2}", evnt.Name, tag.ID, scheduleItemFilterCriteria), new CachePartition(scheduleItemFilterCriteria.PageIndex, scheduleItemFilterCriteria.PageSize), () => repository.GetScheduleItemsByTag(evnt, context.User.IsAuthenticated && context.User.Cast <User>() != null ? context.User.Cast <User>().ID : Guid.Empty, tag, scheduleItemFilterCriteria).FillTags(tagService), si => si.GetDependencies() )); }
public IPageOfItems <ScheduleItem> GetScheduleItemsByTag(EventAddress eventAddress, Guid tagID, ScheduleItemFilterCriteria scheduleItemFilterCriteria) { var result = cache.GetItems <IPageOfItems <ScheduleItem>, ScheduleItem>( string.Format("GetScheduleItems-Event:{0},Tag:{1:N},FilterCriteria:{2}", eventAddress.EventName, tagID, scheduleItemFilterCriteria), new CachePartition(scheduleItemFilterCriteria.PageIndex, scheduleItemFilterCriteria.PageSize), () => repository.GetScheduleItemsByTag(eventAddress, context.User.IsAuthenticated && context.User.Cast <UserAuthenticated>() != null ? context.User.Cast <UserAuthenticated>().ID : Guid.Empty, tagID, scheduleItemFilterCriteria).GetPage(scheduleItemFilterCriteria.PageIndex, scheduleItemFilterCriteria.PageSize).FillTags(tagService), si => si.GetDependencies() ); SetScheduleItemUsers(result); return(result); }