public async Task <IActionResult> PutThai(long id, Thai thai) { if (id != thai.Id) { return(BadRequest()); } _context.Entry(thai).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ThaiExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> Putchart(int id, chart chart) { if (id != chart.ID) { return(BadRequest()); } _context.Entry(chart).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!chartExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }