public async Task <IActionResult> Edit(Users users) { if (ModelState.IsValid) { _context.Update(users); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(users)); }
public async Task <IActionResult> Edit(SettUser settUser) { if (ModelState.IsValid) { _context.Update(settUser); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewData["SettingId"] = new SelectList(_context.DictSettUser, "Id", "Setting", settUser.SettingId); ViewData["UserId"] = new SelectList(_context.Users, "Id", "User", settUser.UserId); return(View(settUser)); }