public List <TagDetails> Details() { var tags = All(); var delayProfiles = _delayProfileService.All(); var importLists = _importListFactory.All(); var notifications = _notificationFactory.All(); var restrictions = _releaseProfileService.All(); var authors = _authorService.GetAllAuthors(); var rootFolders = _rootFolderService.All(); var details = new List <TagDetails>(); foreach (var tag in tags) { details.Add(new TagDetails { Id = tag.Id, Label = tag.Label, DelayProfileIds = delayProfiles.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList(), ImportListIds = importLists.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList(), NotificationIds = notifications.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList(), RestrictionIds = restrictions.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList(), AuthorIds = authors.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList(), RootFolderIds = rootFolders.Where(c => c.DefaultTags.Contains(tag.Id)).Select(c => c.Id).ToList() }); } return(details); }
public List <TagDetails> Details() { var tags = All(); var delayProfiles = _delayProfileService.All(); var notifications = _notificationFactory.All(); var restrictions = _releaseProfileService.All(); var series = _seriesService.GetAllSeries(); var details = new List <TagDetails>(); foreach (var tag in tags) { details.Add(new TagDetails { Id = tag.Id, Label = tag.Label, DelayProfileIds = delayProfiles.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList(), NotificationIds = notifications.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList(), RestrictionIds = restrictions.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList(), SeriesIds = series.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList() } ); } return(details); }
private List <ReleaseProfileResource> GetAll() { return(_releaseProfileService.All().ToResource()); }
private List <RestrictionResource> GetAllRestrictions() { return(_releaseProfileService.All().ToResource()); }