public async Task <IActionResult> PutTramBienAp(int id, TramBienAp tramBienAp) { if (id != tramBienAp.Id) { return(BadRequest()); } _context.Entry(tramBienAp).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TramBienApExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutQuanLy(int id, QuanLy quanLy) { if (id != quanLy.Tba) { return(BadRequest()); } _context.Entry(quanLy).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!QuanLyExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutNhanVien(string id, NhanVien nhanVien) { if (id != nhanVien.DienThoai) { return(BadRequest()); } _context.Entry(nhanVien).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NhanVienExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }