public async Task <IActionResult> PutPP_CentricScore([FromRoute] Guid id, [FromBody] PP_CentricScore pP_CentricScore) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != pP_CentricScore.CentricScoreID) { return(BadRequest()); } _context.Entry(pP_CentricScore).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PP_CentricScoreExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PostPP_CentricScore([FromBody] PP_CentricScore pP_CentricScore) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.CentricScores.Add(pP_CentricScore); await _context.SaveChangesAsync(); return(CreatedAtAction("GetPP_CentricScore", new { id = pP_CentricScore.CentricScoreID }, pP_CentricScore)); }