public IActionResult OnPost(RegisterationModel model) { try { if (!model.IsValid()) { return(null); } else { var res = registerCommand.Execute(model); return(RedirectToPage("Login")); } } catch (Exception ex) { ErrorHandling errorHandling = new ErrorHandling(); var res = errorHandling.GetErrorMessage(ex); TempData["ErrorMessage"] = res; return(null); } }
public void Register(ICollection <string> args) { registerCommand.Execute(args); }