public async Task <ActionResult <PiecesJointesf> > PostPiecesJointesf(PiecesJointesf piecesJointesf) { _context.piecesJointesfs.Add(piecesJointesf); await _context.SaveChangesAsync(); return(CreatedAtAction("GetPiecesJointesf", new { id = piecesJointesf.Id }, piecesJointesf)); }
public async Task <IActionResult> PutPiecesJointesf(int id, PiecesJointesf piecesJointesf) { if (id != piecesJointesf.Id) { return(BadRequest()); } _context.Entry(piecesJointesf).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PiecesJointesfExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }