public async Task <IActionResult> PutService(int id, Service service) { if (id != service.ServiceId) { return(BadRequest()); } _context.Entry(service).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ServiceExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutIssue(int id, Issue issue) { if (id != issue.ReportNumber) { return(BadRequest()); } _context.Entry(issue).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!IssueExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }