Beispiel #1
0
        static void CreateClientsTable()
        {
            string sql = ""
              + "CREATE TABLE clients "
              + "(client_Id serial NOT NULL, "
              + "last_name Text NOT NULL, "
              + "first_name Text NOT NULL, "
              + "email Text NOT NULL, "
              + "CONSTRAINT client_pkey PRIMARY KEY (client_Id))";

              var Model = new PGTable<Client>(_connectionStringName);
              Model.Execute(sql);
        }
Beispiel #2
0
 static void DropTable(string tableName)
 {
     string sql = string.Format("DROP TABLE {0}", tableName);
       var Model = new PGTable<dynamic>(_connectionStringName);
       Model.Execute(sql);
 }
        void CreateWTFTable()
        {
            string sql = ""
              + "CREATE TABLE wtf "
              + "(\"CLient_Id\" serial NOT NULL, "
              + "\"Last Name\" Text NOT NULL, "
              + "\"first_name\" Text NOT NULL, "
              + "\"Email\" Text NOT NULL, "
              + "CONSTRAINT wtf_pkey PRIMARY KEY (\"CLient_Id\"))";

              var Model = new PGTable<dynamic>(_connectionStringName);
              Model.Execute(sql);
        }