public IActionResult Update(int orderId, [FromBody] Order order) { if (order == null) { if (_ordersService.ClearItems(orderId)) { return(Ok(_ordersService.Get(orderId))); } } if (_ordersService.Update(orderId, order)) { return(Ok(_ordersService.Get(orderId))); } return(NotFound()); }