public override void Run(object context)
        {
            String schemaName = "ADONETTEST";
            try
            {
                DbDefault.CreateDB(schemaName, DbCreateType.PKPartition);

                DbController dbc = new DbController(Connection, schemaName);

                IList<Address> objList1 = dbc.GetAddresses();
                foreach (Address obj in objList1)
                    Log(obj.ToString());

                IList<Supplier> objList2 = dbc.GetSuppliers();
                foreach (Supplier obj in objList2)
                    Log(obj.ToString());

                IList<Category> objList3 = dbc.GetCategories();
                foreach (Category obj in objList3)
                    Log(obj.ToString());

                IList<Product> objList4 = dbc.GetProducts();
                foreach (Product obj in objList4)
                    Log(obj.ToString());

                IList<Customer> objList5 = dbc.GetCustomers();
                foreach (Customer obj in objList5)
                    Log(obj.ToString());

                IList<Order> objList6 = dbc.GetOrders();
                foreach (Order obj in objList6)
                    Log(obj.ToString());

                IList<OrderDetail> objList7 = dbc.GetOrderDetails();
                foreach (OrderDetail obj in objList7)
                    Log(obj.ToString());
            }
            catch (Exception e)
            {
                Fail(e);
            }
            finally
            {
                DbDefault.DropDB(schemaName);
                base.Run(context);
            }
        }
Esempio n. 2
0
        public override void Run(object context)
        {
            String schemaName = "ADONETTEST";

            try
            {
                DbDefault.CreateDB(schemaName, DbCreateType.PKPartition);

                DbController dbc = new DbController(Connection, schemaName);

                IList <Address> objList1 = dbc.GetAddresses();
                foreach (Address obj in objList1)
                {
                    Log(obj.ToString());
                }

                IList <Supplier> objList2 = dbc.GetSuppliers();
                foreach (Supplier obj in objList2)
                {
                    Log(obj.ToString());
                }

                IList <Category> objList3 = dbc.GetCategories();
                foreach (Category obj in objList3)
                {
                    Log(obj.ToString());
                }

                IList <Product> objList4 = dbc.GetProducts();
                foreach (Product obj in objList4)
                {
                    Log(obj.ToString());
                }

                IList <Customer> objList5 = dbc.GetCustomers();
                foreach (Customer obj in objList5)
                {
                    Log(obj.ToString());
                }

                IList <Order> objList6 = dbc.GetOrders();
                foreach (Order obj in objList6)
                {
                    Log(obj.ToString());
                }

                IList <OrderDetail> objList7 = dbc.GetOrderDetails();
                foreach (OrderDetail obj in objList7)
                {
                    Log(obj.ToString());
                }
            }
            catch (Exception e)
            {
                Fail(e);
            }
            finally
            {
                DbDefault.DropDB(schemaName);
                base.Run(context);
            }
        }