public async Task <IActionResult> CreateAdmin(AdminProfileViewModel vm) { if (!ModelState.IsValid) { return(View()); } var result = await _repository.CreateAdmin(vm); if (!result.Succeeded) { AddErrors(result); return(View()); } return(RedirectToAction("Admins")); }