Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var firstLetter  = Console.ReadLine();
            var invoiceQuery = new InvoiceQuery();
            var invoices     = invoiceQuery.GetInvoiceByTrackFirstLetter(firstLetter);

            foreach (var invoice in invoices)
            {
                Console.WriteLine("Invoices Id: {0} was shipped to {1}", invoice.InvoiceId, invoice.BillingAddress);
            }

            var invoiceModifier = new InvoiceModifier();

            invoiceModifier.Delete(9);

            Console.ReadLine();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            // takes user input
            var firstLetter = Console.ReadLine();

            // querying database
            var invoiceQuery = new InvoiceQuery();
            var invoices     = invoiceQuery.GetInvoiceByTrackFirstLetter(firstLetter);

            // prints output to console
            foreach (var invoice in invoices)
            {
                Console.WriteLine($"Invoice Id {invoice.InvoiceId} was shipped to {invoice.BillingAddress}.");
            }

            var invoiceModifier = new InvoiceModifier();

            invoiceModifier.Delete(9);

            Console.ReadLine();
        }