Exemplo n.º 1
0
 static void Main()
 {
     foreach (var customer in DataAccessObjectsClass.Customers_With_Orders_In_1997_Shipped_To_Canada_Sql_View())
     {
         Console.WriteLine(customer.CustomerID);
     }
 }
Exemplo n.º 2
0
        static void Main()
        {
            var region    = "SP";
            var startDate = new DateTime(1995, 5, 10);
            var endDate   = new DateTime(1996, 12, 4);

            var orders = DataAccessObjectsClass.Sales_By_Specified_Region_And_Date_Period_View(region, startDate, endDate);

            foreach (var order in orders)
            {
                Console.WriteLine(order.OrderID);
            }
        }
        private static void TestInsertMethod()
        {
            var customer = new Customer()
            {
                CustomerID   = "TEST",
                CompanyName  = "UNKNOWN",
                ContactName  = "UNNAMED",
                ContactTitle = "NO-TITLE"
            };

            var affectedRows = DataAccessObjectsClass.InsertCustomer(customer);

            Console.WriteLine("\rInsert -> ({0} affected row(s))", affectedRows);
        }
Exemplo n.º 4
0
        static void TestDeleteMethod()
        {
            var affectedRows = DataAccessObjectsClass.DeleteCustomer("TEST");

            Console.WriteLine("Delete -> ({0} affected row(s))", affectedRows);
        }
Exemplo n.º 5
0
        static void TestModifyMethod()
        {
            var affectedRows = DataAccessObjectsClass.ModifyCustomerCompanyName("TEST", "NEW-NAME");

            Console.WriteLine("Modify -> ({0} affected row(s))", affectedRows);
        }
Exemplo n.º 6
0
        static void TestInsertMethod()
        {
            var affectedRows = DataAccessObjectsClass.InsertCustomer("TEST", "UNKNOWN", "UNNAMED", "NO-TITLE");

            Console.WriteLine("Insert -> ({0} affected row(s))", affectedRows);
        }