private void CreateTable(string tableName, IEnumerator <DataColumn> columns, DataColumn geometryColumn) { if (String.IsNullOrEmpty(tableName)) { throw new ArgumentNullException("tableName"); } if (columns == null) { throw new ArgumentNullException("columns"); } Table table = new Table(_database, tableName); _attributeTypeProvider = new DefaultSQL2008AttributeTypeProvider(table); if (geometryColumn != null) { DataType dataType = _geometryTypeProvider.GetGeometryType(_geometryFactory.GetGeometryType(typeof(GeoAPI.Geometries.IGeometryCollection))); table.Columns.Add(new Column(table, geometryColumn.ColumnName, dataType)); } columns.Reset(); while (columns.MoveNext()) { DataColumn dataColumn = columns.Current; Column c = GetColumn(dataColumn); //if(c!= null) // table.Columns.Add(c); table.Columns.Add(c); } table.Create(); }