public async Task <IActionResult> PutProductInstance(int id, ProductInstance productInstance)
        {
            if (id != productInstance.ProductInstanceId)
            {
                return(BadRequest());
            }

            _context.Entry(productInstance).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ProductInstanceExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutCategory(int id, Category category)
        {
            if (id != category.CategoryId)
            {
                return(BadRequest());
            }

            _context.Entry(category).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CategoryExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }