Esempio n. 1
0
        private static void Crud()
        {
            var service = new SimpleDataDynamicServices();

            dynamic customer = new ExpandoObject();

            customer.FirstName = "Ian";
            customer.LastName  = "Russell";
            customer.Email     = "*****@*****.**";

            customer = service.Insert(customer);

            ObjectDumper.Write(customer);

            customer.Country = "United Kingdom";

            service.Update(customer);

            customer = service.Get(customer.CustomerId);

            ObjectDumper.Write(customer);

            service.Delete(customer);

            customer = service.Get(customer.CustomerId);

            ObjectDumper.Write(customer);
        }
Esempio n. 2
0
        private static void Crud()
        {
            var service = new SimpleDataDynamicServices();

            dynamic customer = new ExpandoObject();

            customer.FirstName = "Ian";
            customer.LastName = "Russell";
            customer.Email = "*****@*****.**";

            customer = service.Insert(customer);

            ObjectDumper.Write(customer);

            customer.Country = "United Kingdom";

            service.Update(customer);

            customer = service.Get(customer.CustomerId);

            ObjectDumper.Write(customer);

            service.Delete(customer);

            customer = service.Get(customer.CustomerId);

            ObjectDumper.Write(customer);
        }
Esempio n. 3
0
        private static void SelectProcedure()
        {
            var service = new SimpleDataDynamicServices();

            var sales = service.GetSalesSummary(2011);

            foreach (var item in sales)
                ObjectDumper.Write(item);
        }
Esempio n. 4
0
        private static void FilteredQuery()
        {
            var service = new SimpleDataDynamicServices();

            var customers = service.GetCustomersFromCountry("United Kingdom");

            foreach (var customer in customers)
                ObjectDumper.Write(customer);
        }
Esempio n. 5
0
        private static void SelectProcedure()
        {
            var service = new SimpleDataDynamicServices();

            var sales = service.GetSalesSummary(2011);

            foreach (var item in sales)
            {
                ObjectDumper.Write(item);
            }
        }
Esempio n. 6
0
        private static void SimpleQuery()
        {
            var service = new SimpleDataDynamicServices();

            var customers = service.GetCustomers();

            foreach (var customer in customers)
            {
                ObjectDumper.Write(customer);
            }
        }
Esempio n. 7
0
        private static void FilteredQuery()
        {
            var service = new SimpleDataDynamicServices();

            var customers = service.GetCustomersFromCountry("United Kingdom");

            foreach (var customer in customers)
            {
                ObjectDumper.Write(customer);
            }
        }
Esempio n. 8
0
        private static void PagedQuery()
        {
            var service = new SimpleDataDynamicServices();

            var result = service.GetCustomers(2);

            foreach (dynamic customer in result.Items)
                ObjectDumper.Write(customer);

            ObjectDumper.Write(string.Format("There are {0} records matching the criteria", result.TotalRecords));
        }
Esempio n. 9
0
        private static void PagedQuery()
        {
            var service = new SimpleDataDynamicServices();

            var result = service.GetCustomers(2);

            foreach (dynamic customer in result.Items)
            {
                ObjectDumper.Write(customer);
            }

            ObjectDumper.Write(string.Format("There are {0} records matching the criteria", result.TotalRecords));
        }
Esempio n. 10
0
        private static void SimpleQuery()
        {
            var service = new SimpleDataDynamicServices();

            var customers = service.GetCustomers();

            foreach (var customer in customers)
                ObjectDumper.Write(customer);
        }