public async Task <IActionResult> Edit(EditUserViewModel vm) { if (!ModelState.IsValid) { return(View(vm)); } var user = await _userManager.FindByIdAsync(vm.Id); await _userManager.UpdateAsync(vm.Map(user)); return(RedirectToAction("Index")); }