I am coding in c# with the Npgsql package. I have connected to Postgresql like this
  string connString = String.Format("Server={0};Port={1};User Id= {2};Password={3};Database={4};", serverName, "5432", username, password,databaseName);
  NpgsqlConnection conn = new NpgsqlConnection(connString);
  conn.Open(); 
Is there any way that I could access the the tables,views,primary keys and foreign keys and generate create scripts for them from c#?
 
     
    