public async Task <IActionResult> PutPolicy(int id, Policy policy) { if (id != policy.PolicyId) { return(BadRequest()); } _context.Entry(policy).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PolicyExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutFeedback(int id, Feedback feedback) { if (id != feedback.FeedbackId) { return(BadRequest()); } _context.Entry(feedback).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FeedbackExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }