Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            PostgreEntity entity = new PostgreEntity();

            entity.name = "test";


            entity.entityValues.Add(new KeyValuePair <string, string>("id", ""));
            entity.entityValues.Add(new KeyValuePair <string, string>("firstvalue", ""));
            entity.entityValues.Add(new KeyValuePair <string, string>("secondvalue", ""));
            entity.entityValues.Add(new KeyValuePair <string, string>("lastvalue", ""));
            Database database = new Database();

            database.addEntity(entity);

            AvailableItemQueries availableItems = new AvailableItemQueries(entity);

            availableItems.registerQueries(new InsertItemQuery());
            availableItems.registerQueries(new DeleteItemQuery());
            //availableItems.registerQueries(new PostgreUpdate());



            PresentationDirector presentationDirector = new PresentationDirector(new FormView());

            presentationDirector.buildPresentable(availableItems);
        }
 public AvailablePostgresQueries(PostgreEntity entity) : base(entity)
 {
 }