public async Task <ActionResult <BoodschapRow> > PostBoodschapRow(BoodschapRow boodschapRow) { _context.BoodschapRows.Add(boodschapRow); await _context.SaveChangesAsync(); return(CreatedAtAction("GetBoodschapRow", new { id = boodschapRow.BoodschapRowID }, boodschapRow)); }
public async Task <IActionResult> PutBoodschapRow(int id, BoodschapRow boodschapRow) { if (id != boodschapRow.BoodschapRowID) { return(BadRequest()); } _context.Entry(boodschapRow).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BoodschapRowExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }