Пример #1
0
        public async Task <ActionResult> PatriallyUpdateClientAsync(int OrderId, int Id, JsonPatchDocument <OrderItemForUpdate> patchDocument)
        {
            try
            {
                if (_OrderService.FindByIdAsync(OrderId) == null)
                {
                    return(NotFound("This OrderId doesnt exist."));
                }

                await _OrderItemService.EditOrderItemAsync(Id, patchDocument);

                return(NoContent());
            }
            catch (NotFoundException)
            {
                return(NotFound("Jason parameters are not Correct or this OrdrItem Id does not exist."));
            }
        }