public async Task <IActionResult> Register(RegisterViewModel model) { if (!ModelState.IsValid) { throw new Exception("Invalid registration information."); } var user = await register.RegisterUser(model); await login.LogInUserAsync(user, HttpContext); return(RedirectToAction(nameof(HomeController.Index), "Home")); }
public async Task <RegistrationResult> Register(string name, string email, string password, string confirm_password, Provider pr) { var results = await _register.RegisterUser(name, email, password, confirm_password, pr); return(results); }