Example #1
0
        public async Task <IList <Domain.Basket> > Get(BasketSearchArgs args)
        {
            var baskets = await _fakeDB.BasketsAsync();

            if (args.CustomerGuid == null && !args.Id.HasValue)
            {
                return(baskets);
            }
            if (args.Id.HasValue)
            {
                return(baskets.Where(c => c.Id == args.Id).ToList());
            }
            return(baskets.Where(c => c.CustomerGuid == args.CustomerGuid).ToList());
        }
Example #2
0
 public Task <IList <Basket> > Get(BasketSearchArgs args)
 {
     return(_readonlyBasketRepository.Get(args));
 }