public IActionResult OnPostCreate(CreateAccount command) { var result = new OperationResult(); if (ModelState.IsValid) { result = _accountApplication.Register(command); } return(new JsonResult(result)); }
public IActionResult OnPostRegister(RegisterAccount command) { var result = _accountApplication.Register(command); if (result.IsSuccedded) { return(RedirectToPage("/Account")); } RegisterMessage = result.Message; return(RedirectToPage("/Account")); }
public IActionResult OnPostRegister() { var operationResult = new OperationResult(); var createAccount = new CreateAccount() { Username = RegisterAccount.Username, Password = RegisterAccount.Password, RoleId = 2, Mobile = RegisterAccount.Mobile, Fullname = RegisterAccount.Fullname, }; operationResult = _accountApplication.Register(createAccount); if (!operationResult.IsSucceeded) { RegisterMessage = operationResult.Message; } return(Page()); }
public JsonResult OnPostCreate(RegisterAccount command) { var result = _accountApplication.Register(command); return(new JsonResult(result)); }
public IActionResult Register(RegisterAccount command) { var result = _accountApplication.Register(command); return(Ok(result.IsSuccedded)); }