private static void RefreshViewNames() { // gets all viewnames using (var db = new CommenceDatabase()) { foreach (string categoryName in Categories) { foreach (string viewName in db.GetViewNames(categoryName)) { viewNames.Add(viewName, categoryName); } } } }