public async Task <ActionResult <Question> > Put(int id, Question ques) { if (id != ques.QuesId) { return(BadRequest()); } _context.Entry(ques).State = Microsoft.EntityFrameworkCore.EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }
public async Task <ActionResult <Users> > Put(int id, Users user) { if (id != user.UserId) { return(BadRequest()); } _context.Entry(user).State = Microsoft.EntityFrameworkCore.EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }