public async Task <IActionResult> PutTcurveValueTable(short id, TcurveValueTable tcurveValueTable) { if (id != tcurveValueTable.TcurveValueTableId) { return(BadRequest()); } _context.Entry(tcurveValueTable).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TcurveValueTableExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <TcurveValueTable> > PostTcurveValueTable(TcurveValueTable tcurveValueTable) { _context.TcurveValueTable.Add(tcurveValueTable); try { await _context.SaveChangesAsync(); } catch (DbUpdateException) { if (TcurveValueTableExists(tcurveValueTable.TcurveValueTableId)) { return(Conflict()); } else { throw; } } return(CreatedAtAction("GetTcurveValueTable", new { id = tcurveValueTable.TcurveValueTableId }, tcurveValueTable)); }