public ColumnLoader(SchemaExtendedReader schemaReader) { _sr = schemaReader; var cols = _sr.Columns(null); _noColumns = (cols.Rows.Count == 0); _columnConverter = new ColumnConverter(cols); }
public override IList <DatabaseColumn> Columns(string tableName) { var dt = _schemaReader.Columns(tableName); var columnConverter = new ColumnConverter(dt); var cols = columnConverter.Columns().ToList(); return(cols); }
public IEnumerable <DatabaseColumn> Load(string tableName) { if (string.IsNullOrEmpty(tableName)) { throw new ArgumentNullException("tableName", "must have tableName"); } if (_noColumns) { //have to get columns for specific table var cols = _sr.Columns(tableName); _columnConverter = new ColumnConverter(cols); } return(_columnConverter.Columns(tableName)); }
public IEnumerable <DatabaseColumn> Load(string viewName, string schemaName) { if (string.IsNullOrEmpty(viewName)) { throw new ArgumentNullException("viewName", "must have viewName"); } //schemaName may be null if (_noColumns) { //have to get columns for specific table var cols = _sr.Columns(viewName); _columnConverter = new ViewColumnConverter(cols); } return(_columnConverter.Columns(viewName, schemaName)); }