public CollectionContext <ListViewModel> Put(SpecificListsGetRequest listsRequest) { ServiceUtility.RequestBackendUserAuthentication(); var listService = new ListService(); var listManager = listService.GetManager(listsRequest.Provider); if (listsRequest.Ids != null && listsRequest.Ids.Length > 0) { var lists = listService.GetContentItems(listsRequest.Provider) .Where(l => listsRequest.Ids.Contains(l.Id) && l.Status == ContentLifecycleStatus.Master) .ToList(); var liveContentDictionary = this.GetRelevantItemsList(lists, listManager, ContentLifecycleStatus.Live); var tempContentDictionary = this.GetRelevantItemsList(lists, listManager, ContentLifecycleStatus.Temp); var result = listService.GetViewModelList(lists, listManager.Provider, liveContentDictionary, tempContentDictionary).ToList(); this.LoadLifecycleStatus(result, liveContentDictionary, tempContentDictionary, listManager); ServiceUtility.DisableCache(); return(new CollectionContext <ListViewModel>(result) { TotalCount = result.Count }); } return(new CollectionContext <ListViewModel>()); }
public CollectionContext<ListViewModel> Put(SpecificListsGetRequest listsRequest) { ServiceUtility.RequestBackendUserAuthentication(); var listService = new ListService(); var listManager = listService.GetManager(listsRequest.Provider); if (listsRequest.Ids != null && listsRequest.Ids.Length > 0) { var lists = listService.GetContentItems(listsRequest.Provider) .Where(l => listsRequest.Ids.Contains(l.Id) && l.Status == ContentLifecycleStatus.Master) .ToList(); var liveContentDictionary = this.GetRelevantItemsList(lists, listManager, ContentLifecycleStatus.Live); var tempContentDictionary = this.GetRelevantItemsList(lists, listManager, ContentLifecycleStatus.Temp); var result = listService.GetViewModelList(lists, listManager.Provider, liveContentDictionary, tempContentDictionary).ToList(); this.LoadLifecycleStatus(result, liveContentDictionary, tempContentDictionary, listManager); ServiceUtility.DisableCache(); return new CollectionContext<ListViewModel>(result) { TotalCount = result.Count }; } return new CollectionContext<ListViewModel>(); }