public async Task <IActionResult> PutInstrument(int id, Instrument instrument) { if (id != instrument.Id) { return(BadRequest()); } _context.Entry(instrument).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InstrumentExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPriceGrid(int id, PriceGrid priceGrid) { if (id != priceGrid.Id) { return(BadRequest()); } _context.Entry(priceGrid).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PriceGridExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }