Пример #1
0
        public void DeActiveDeletedDashboards(string apiWorkspaceId)
        {
            var dashboardsInApiWorkspace = powerBIProvider.GetAllDashboardsInWorkspace(apiWorkspaceId);
            var dashboardsInDBWorkspace  = dashboardRepository.GetAll().Where(dashboard => dashboard.Workspace.WorkspaceId == apiWorkspaceId);

            foreach (var dbDashboard in dashboardsInDBWorkspace)
            {
                if (dashboardsInApiWorkspace.ToList().Exists(apiDashboard => apiDashboard.Id == dbDashboard.DashboardId))
                {
                    continue;
                }
                else
                {
                    dbDashboard.IsActive = false;
                }
            }
        }