示例#1
0
 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);
     }
 }
示例#2
0
 public void Register(ICollection <string> args)
 {
     registerCommand.Execute(args);
 }