public async Task <IActionResult> PutEpulsePatternValueTable(short id, EpulsePatternValueTable epulsePatternValueTable) { if (id != epulsePatternValueTable.EpulsePatternValueTableId) { return(BadRequest()); } _context.Entry(epulsePatternValueTable).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EpulsePatternValueTableExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <EpulsePatternValueTable> > PostEpulsePatternValueTable(EpulsePatternValueTable epulsePatternValueTable) { _context.EpulsePatternValueTable.Add(epulsePatternValueTable); try { await _context.SaveChangesAsync(); } catch (DbUpdateException) { if (EpulsePatternValueTableExists(epulsePatternValueTable.EpulsePatternValueTableId)) { return(Conflict()); } else { throw; } } return(CreatedAtAction("GetEpulsePatternValueTable", new { id = epulsePatternValueTable.EpulsePatternValueTableId }, epulsePatternValueTable)); }