Beispiel #1
0
        public IEnumerable <Order> Get()
        {
            var userId = HttpContext.GetUserId();

            return(_basketRepo.GetBasket(userId));
        }
Beispiel #2
0
        public async Task <ActionResult <Basket> > GetBasket(string userName)
        {
            var basket = await _basketRepo.GetBasket(userName);

            return(Ok(basket ?? new Basket(userName)));
        }