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()); }