public async Task <ActionResult <TblUser> > update(TblUser tblUser) { //if (id != tblUser.Id) //{ // return BadRequest(); //} _context.Entry(tblUser).State = EntityState.Modified; try { await _context.SaveChangesAsync(); //await _signalRClient.SendMessage("", ""); return(tblUser); } catch (DbUpdateConcurrencyException) { if (!TblUserExists(tblUser.Id)) { return(NotFound()); } else { throw; } } }
public async Task <IActionResult> PutTblUser(int id, TblUser tblUser) { if (id != tblUser.Id) { return(BadRequest()); } _context.Entry(tblUser).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblUserExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }