Пример #1
0
        public IEnumerable <TableauView> GetOrgViewsNoCharts(Guid orgId, bool canViewOnly = false)
        {
            var context = Context as DwhDashboardContext;

            var org        = Find(orgId);
            var orgViewIds = org.Views.Select(x => x.TabViewId).ToList();

            var allViews = _tabViewRepository.GetViewsFiltered().ToList();
            var orgViews = allViews.Where(x => orgViewIds.Contains(x.Id)).ToList();

            if (canViewOnly)
            {
                return(orgViews);
            }

            return(TableauView.GenerateShowingChecked(allViews, orgViews));
        }