Esempio n. 1
0
 public static IEnumerable <MapItem> GetSaleMapItemsByCustomer(IQueryable <OrderItem> orderItems, long customerId, Period period = Period.Lifetime)
 {
     return(GetSaleMapItemsCore(orderItems.Where(x => x.Order.CustomerId == customerId).Where(QueriesHelper.GetOrderItemsForPeriodFilter(period))));
 }
Esempio n. 2
0
 public static IEnumerable <CustomerStore> GetDistinctStoresForPeriod(IQueryable <Order> orders, long customerId, Period period = Period.Lifetime)
 {
     return(QueriesHelper.GetCustomerOrdersForPeriod(orders, period, customerId).GroupBy(o => o.Store).Select(g => g.Key).Distinct());
 }
Esempio n. 3
0
 public static IEnumerable <MapItem> GetSaleMapItems(IQueryable <OrderItem> orderItems, long productId, Period period = Period.Lifetime)
 {
     return(GetSaleMapItemsCore(orderItems.Where(QueriesHelper.GetOrderItemsForPeriodFilter(period)).Where(x => x.ProductId == productId)));
 }