public async Task <ActionResult <ZPUP> > PostZPUP(ZPUP zPUP) { _context.ZPUPs.Add(zPUP); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(GetZPUP), new { id = zPUP.ZPUPId }, zPUP)); }
public async Task <IActionResult> PutZPUP(int id, ZPUP zPUP) { if (id != zPUP.ZPUPId) { return(BadRequest()); } _context.Entry(zPUP).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ZPUPExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }