public async Task <ActionResult <DRemovedItemBatch> > PostDRemovedItemBatch(DRemovedItemBatch dRemovedItemBatch) { _context.DRemovedItemBatches.Add(dRemovedItemBatch); await _context.SaveChangesAsync(); return(CreatedAtAction("GetDRemovedItemBatch", new { id = dRemovedItemBatch.Id }, dRemovedItemBatch)); }
public async Task <IActionResult> PutDRemovedItemBatch(int id, DRemovedItemBatch dRemovedItemBatch) { if (id != dRemovedItemBatch.Id) { return(BadRequest()); } _context.Entry(dRemovedItemBatch).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DRemovedItemBatchExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }