public async Task <ActionResult <status_request> > Poststatus_request(status_request status_request) { _context.status_request.Add(status_request); await _context.SaveChangesAsync(); return(CreatedAtAction("Getstatus_request", new { id = status_request.id_status_request }, status_request)); }
public async Task <IActionResult> Putstatus_request(int id, status_request status_request) { if (id != status_request.id_status_request) { return(BadRequest()); } _context.Entry(status_request).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!status_requestExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }