public async Task <IActionResult> PutTblKhenThuongKiLuat(long id, TblKhenThuongKiLuat tblKhenThuongKiLuat) { if (id != tblKhenThuongKiLuat.MaKtkl) { return(BadRequest()); } _context.Entry(tblKhenThuongKiLuat).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblKhenThuongKiLuatExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <TblKhenThuongKiLuat> > PostTblKhenThuongKiLuat(TblKhenThuongKiLuat tblKhenThuongKiLuat) { _context.TblKhenThuongKiLuats.Add(tblKhenThuongKiLuat); await _context.SaveChangesAsync(); return(CreatedAtAction("GetTblKhenThuongKiLuat", new { id = tblKhenThuongKiLuat.MaKtkl }, tblKhenThuongKiLuat)); }