public async Task <ActionResult <InstTypeSetup> > PostInstTypeSetup(InstTypeSetup instTypeSetup) { _context.InstTypeSetup.Add(instTypeSetup); await _context.SaveChangesAsync(); return(CreatedAtAction("GetInstTypeSetup", new { id = instTypeSetup.Id }, instTypeSetup)); }
public async Task <IActionResult> PutInstTypeSetup(int id, InstTypeSetup instTypeSetup) { if (id != instTypeSetup.Id) { return(BadRequest()); } _context.Entry(instTypeSetup).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InstTypeSetupExists(id)) { return(NotFound()); } else { throw; } } return(Ok(instTypeSetup)); }