public async Task <IActionResult> PutNhomKd(string id, NhomKd nhomKd) { if (id != nhomKd.MaNhomKd) { return(BadRequest()); } _context.Entry(nhomKd).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NhomKdExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPerDetail1(int id, PerDetail1 perDetail1) { if (id != perDetail1.IdDetail) { return(BadRequest()); } _context.Entry(perDetail1).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PerDetail1Exists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutDongTb(string id, DongTb dongTb) { if (id != dongTb.IddongTb) { return(BadRequest()); } _context.Entry(dongTb).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DongTbExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutUser(int id, User user) { if (id != user.IdUser) { return(BadRequest()); } _context.Entry(user).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }