private void FindOrderWithInclude()
        {
            var          c      = customerRepository.FindByName("John", "Doe");
            List <Order> orders = repository.Find <Order>(x => x.Customer.Id == c.Id).ToList();

            Console.Write("Found {0} Orders with {1} OrderLines", orders.Count(), orders.ToList()[0].OrderLines.Count);
        }
Esempio n. 2
0
        private void FindManyOrdersForJohnDoe()
        {
            var customer = customerRepository.FindByName("John", "Doe");
            var orders   = repository.Find <Order>(x => x.Customer.Id == customer.Id);

            Console.Write("Found {0} Orders with {1} OrderLines", orders.Count(), orders.ToList()[0].OrderLines.Count);
        }