public RelationalDatabaseDataSet GetBy(ITableGateway tableGateway, CatalogName[] catalogNameCollection) { _logger.Trace(Strings.TableModuleCall); Guard.Against.Null(tableGateway, nameof(tableGateway)); Guard.Against.NullOrEmptyCollection(catalogNameCollection, nameof(catalogNameCollection)); return(tableGateway.FindTablesBy(catalogNameCollection)); }
public void FillBy(RelationalDatabaseDataSet dataSet, ITableGateway tableGateway, CatalogName[] catalogNameCollection) { _logger.Trace(Strings.TableModuleCall); Guard.Against.Null(dataSet, nameof(dataSet)); Guard.Against.Null(tableGateway, nameof(tableGateway)); Guard.Against.NullOrEmptyCollection(catalogNameCollection, nameof(catalogNameCollection)); RelationalDatabaseDataSet results = tableGateway.FindTablesBy(catalogNameCollection); dataSet.Merge(results); }
public RelationalDatabaseDataSet GetBy(ITableGateway tableGateway, CatalogName[] catalogNameCollection, TableName[] tableNameCollection) { _logger.Trace(Strings.TableModuleCall); Guard.Against.Null(tableGateway, nameof(tableGateway)); Guard.Against.NullOrEmptyCollection(catalogNameCollection, nameof(catalogNameCollection)); RelationalDatabaseDataSet results = tableGateway.FindTablesBy(catalogNameCollection[0], tableNameCollection); for (int i = 1; i < catalogNameCollection.Length; i++) { results.Merge(tableGateway.FindTablesBy(catalogNameCollection[i], tableNameCollection)); } return(results); }
public RelationalDatabaseDataSet GetTables(string dataSource, string connectionString, CatalogName[] catalogNameCollection) { Guard.Against.NullOrEmpty(dataSource, nameof(dataSource)); Guard.Against.NullOrEmpty(connectionString, nameof(connectionString)); Guard.Against.NullOrEmptyCollection(catalogNameCollection, nameof(catalogNameCollection)); try { ITableGateway gateway = _tableGatewayFactoryFunc(dataSource, connectionString); return(_tableModule.Table.GetBy(gateway, catalogNameCollection)); } catch (Exception ex) { _logger.LogError(ex.Message); throw; } }