public static void Main()
        {
            var orderYear = 1997;
            var country   = "Canada";

            var searchedCustomers = DataAccessObjectsUtils.FindCustomersByOrderYearAndCountryWithSqlQuery(orderYear, country);

            foreach (var customerName in searchedCustomers)
            {
                Console.WriteLine(customerName);
            }
        }
        public static void Main()
        {
            var shipRegion = "RJ";
            var startDate  = new DateTime(1996, 1, 1);
            var endDate    = new DateTime(1996, 12, 30);

            var searchedSales = DataAccessObjectsUtils.FindSpecifiedSalesByRegionAndPeriod(shipRegion, startDate, endDate);

            foreach (var sale in searchedSales)
            {
                Console.WriteLine("Ship name: {0}, address: {1}, country: {2}", sale.ShipName, sale.ShipAddress, sale.ShipCountry);
            }
        }
Beispiel #3
0
        static void ModifyTest()
        {
            var affectedRows = DataAccessObjectsUtils.ModifyCustomerCompanyName("ABCDE", "TestCompanyUpdated");

            Console.WriteLine("Modify -> ({0} affected row(s))", affectedRows);
        }
Beispiel #4
0
        static void DeleteTest()
        {
            var affectedRows = DataAccessObjectsUtils.DeleteCustomer("ABCDE");

            Console.WriteLine("Delete -> ({0} affected row(s))", affectedRows);
        }
Beispiel #5
0
        static void InsertTest()
        {
            var affectedRows = DataAccessObjectsUtils.InsertCustomer("ABCDE", "TestCompany", "TestContactName", "TestCity");

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