Example #1
0
        public Order CreateOrder(Customer customer)
        {
            if (customer == null)
                customer = GetDefaultCustomer();

            return new Order
            {
                CustomerID = customer.CustomerID,
                OrderDate = DateTime.Now,
                Lines = new List<OrderLine>()
            };
        }
Example #2
0
 public IEnumerable<Order> GetCustomerOrders(Customer customer)
 {
     return CreateContext().Query<Order>("SELECT * FROM Orders WHERE CustomerID = @CustomerID", new {customer.CustomerID});
 }