public async Task <ActionResult <PiecesJointesI> > PostPiecesJointesI(PiecesJointesI piecesJointesI) { _context.piecesJointesIs.Add(piecesJointesI); await _context.SaveChangesAsync(); return(CreatedAtAction("GetPiecesJointesI", new { id = piecesJointesI.Id }, piecesJointesI)); }
public async Task <IActionResult> PutPiecesJointesI(int id, PiecesJointesI piecesJointesI) { if (id != piecesJointesI.Id) { return(BadRequest()); } _context.Entry(piecesJointesI).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PiecesJointesIExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }