private void Construct(NpgsqlDataReader reader)
 {
     _id   = Convert.ToInt32(reader[Table + "_" + Columns.Id]);
     _name = Convert.ToString(reader[Table + "_" + Columns.Name]);
     _srid = Convert.ToInt32(reader[Table + "_" + Columns.SRID]);
     _type = (ShapefileType)Enum.Parse(typeof(ShapefileType), Convert.ToString(reader[Table + "_" + Columns.Type]));
 }
 private void Construct(NpgsqlDataReader reader)
 {
     _id = Convert.ToInt32(reader[Table + "_" + Columns.Id]);
     _name = Convert.ToString(reader[Table + "_" + Columns.Name]);
     _srid = Convert.ToInt32(reader[Table + "_" + Columns.SRID]);
     _type = (ShapefileType)Enum.Parse(typeof(ShapefileType), Convert.ToString(reader[Table + "_" + Columns.Type]));
 }
 public static Shapefile Create(string name, int srid, ShapefileType type)
 {
     return new Shapefile(Convert.ToInt32(DB.Connection.ExecuteScalar("INSERT INTO " + Table + " (" + Columns.Insert + ") VALUES ('" + name + "'," + srid + ",'" + type + "') RETURNING " + Columns.Id)));
 }
 public static Shapefile Create(string name, int srid, ShapefileType type)
 {
     return(new Shapefile(Convert.ToInt32(DB.Connection.ExecuteScalar("INSERT INTO " + Table + " (" + Columns.Insert + ") VALUES ('" + name + "'," + srid + ",'" + type + "') RETURNING " + Columns.Id))));
 }