Exemplo n.º 1
0
        internal static void TestSalesByRegionAndPeriod()
        {
            string   shipRegion = "RJ";
            DateTime startDate  = new DateTime(1990, 1, 1);
            DateTime endDate    = new DateTime(1999, 1, 1);

            NwDao.ShowSalesByRegionAndPeriod(shipRegion, startDate, endDate);
        }
Exemplo n.º 2
0
 internal static void TestCreateModifyDeleteCustomer()
 {
     NwDao.InsertCustomer("cus1", "myCompany1");
     NwDao.ShowCustomer("cus1");
     NwDao.UpdateCustomer("cus1", "myCompany1Edited", "myAddress1", "myCity1", "country1");
     NwDao.ShowCustomer("cus1");
     NwDao.DeleteCustomer("cus1");
     NwDao.ShowCustomer("cus1");
 }
Exemplo n.º 3
0
        private static void ParallelUpdate()
        {
            // every time we run this method we`ll get different final result for
            // company name. To correct this behaviour we need to implement transactions
            // or use somekind of locking mechanism inside c# code
            NwDao.DeleteCustomer("Par1");
            NwDao.InsertCustomer("Par1", "par1");

            Parallel.For(0, 20, x => NwDao.UpdateCustomer("Par1", "par1update " + x, "", "", ""));

            Console.WriteLine("Result after simultaneous updating customer with id='Par1' with new company name = 'old name' + [1-20]");
            NwDao.ShowCustomer("Par1");
            NwDao.DeleteCustomer("Par1");
        }
Exemplo n.º 4
0
 internal static void TestCustomerByOrderDateAndShippingAddressNativeSql()
 {
     NwDao.ShowCustomerByOrderDateAndShippingCountryNativeSql(1997, "Canada");
 }
Exemplo n.º 5
0
 internal static void TestCustomerByOrderDateAndShippingAddress()
 {
     NwDao.ShowCustomersByOrderDateAndShippingCountry(new DateTime(1997, 1, 1), "Canada");
 }