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