public async Task <IActionResult> PutArtikel(int id, Artikel artikel) { if (id != artikel.ArtikelId) { return(BadRequest()); } _context.Entry(artikel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ArtikelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutStichprobe(int id, Stichprobe stichprobe) { if (id != stichprobe.StichprobeId) { return(BadRequest()); } _context.Entry(stichprobe).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!StichprobeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }