public async Task <IActionResult> PutTblSupplyAvailable(int id, TblSupplyAvailable tblSupplyAvailable) { if (id != tblSupplyAvailable.ASupplyId) { return(BadRequest()); } _context.Entry(tblSupplyAvailable).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblSupplyAvailableExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <TblSupplyAvailable> > PostTblSupplyAvailable(TblSupplyAvailable tblSupplyAvailable) { _context.TblSupplyAvailables.Add(tblSupplyAvailable); await _context.SaveChangesAsync(); return(CreatedAtAction("GetTblSupplyAvailable", new { id = tblSupplyAvailable.ASupplyId }, tblSupplyAvailable)); }