public void CloseDatabase(string databasePath) { var db = TreeViewItems.Single(x => x.DatabasePath.Equals(databasePath)); TreeViewItems.Remove(db); log.Info("Closed database '" + db.DatabasePath + "'."); }