public async Task <IActionResult> Create([FromBody] OrderItem item)
        {
            if (item == null)
            {
                return(BadRequest());
            }
            var response = await _orderItemService.CreateOrder(item);

            return(Ok());
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create([FromBody] OrderItem item)
        {
            if (item == null)
            {
                return(BadRequest());
            }

            await _orderItemService.CreateOrder(item);

            return(CreatedAtAction(nameof(GetById), new { id = item.ID }, item));
        }