public async Task <IActionResult> ActiveAccount(string id) { if (string.IsNullOrEmpty(id)) { return(NotFound()); } ViewBag.ActivationResult = await _userRepo.ActiveAccount(id); return(View()); }
public async Task <bool> ActiveAccount(int id) { try { userRepository.ActiveAccount(id); await userRepository.SaveChangesAsync(); return(true); } catch (Exception) { return(false); } }