public async Task <IActionResult> PutBProductGrade([FromRoute] int id, [FromBody] BProductGrade bProductGrade)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != bProductGrade.GradeId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PostBProductGrade([FromBody] BProductGrade bProductGrade)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _context.BProductGrade.Add(bProductGrade);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetBProductGrade", new { id = bProductGrade.GradeId }, bProductGrade));
        }