Beispiel #1
0
        public async Task <ActionResult <Order> > Post([FromBody] Customer customer, string sessionId)
        {
            var cart = await _cartClient.Get(sessionId);

            var order = new Order(customer, cart);

            order = await _orderClient.Post(order);

            //TODO replace below point-to-point integration with OrderPlaced event
            await _cartClient.Delete(sessionId);

            return(Ok(order));
        }
Beispiel #2
0
        public async Task <ActionResult <Cart> > Get(string sessionId)
        {
            var cart = await _cartClient.Get(sessionId);

            return(Ok(cart));
        }