Ejemplo n.º 1
0
        public async Task <IActionResult> AddAvailablePieces(int id, int value)
        {
            try
            {
                await _productsService.AddAvailablePieces(id, value);
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!await _productsService.ProductExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }