private List <string> GetEnabledDisabledIndexNames(ITableInfo tableInfo, bool isEnabled) { var indexNamesTemplate = new GetIndexes(tableInfo.DbName, tableInfo.SchemaName, tableInfo.TableName, isEnabled); var indexNamesQuery = indexNamesTemplate.TransformText(); Console.WriteLine(indexNamesQuery); DataTable indexNamesTable; try { indexNamesTable = _queryHelper.ExecuteQueryWithoutParams(tableInfo.DbConnectionString, indexNamesQuery); } catch (Exception ex) { throw new IndexServiceException("An error happened while trying to get index names.", ex); } var columnNames = new List <string>(); foreach (var rowObject in indexNamesTable.Rows) { var row = (DataRow)rowObject; columnNames.Add((string)row[0]); } return(columnNames); }
public async void GetIndex() { await Task.Run(() => { var gi = new GetIndexes(); APIhelper.Flipd = gi.GetIndex(); RaisePropertyChanged("GetIndex"); }); }