public async Task <IActionResult> PutLopHoc(int id, LopHoc lopHoc) { if (id != lopHoc.id) { return(BadRequest()); } _context.Entry(lopHoc).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LopHocExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutTinhThanh(int id, TinhThanh tinhThanh) { if (id != tinhThanh.id) { return(BadRequest()); } _context.Entry(tinhThanh).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TinhThanhExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPhuongXa(int id, PhuongXa phuongXa) { if (id != phuongXa.id) { return(BadRequest()); } _context.Entry(phuongXa).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PhuongXaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutQuanHuyen(int id, QuanHuyen quanHuyen) { if (id != quanHuyen.id) { return(BadRequest()); } _context.Entry(quanHuyen).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!QuanHuyenExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }