コード例 #1
0
        public async Task RegisterUser()
        {
            RegistrationForm.Submit();
            StateHasChanged();
            FormResponse Response = await JSRuntime.InvokeAsync <FormResponse>("RegisterUser", RegistrationForm.Email, RegistrationForm.Password, RegistrationForm.Name);

            if (Response.Success)
            {
                RegistrationForm.Succeed();
            }
            else
            {
                RegistrationForm.Fail(Response.FieldErrors[0]);
            }
            StateHasChanged();
        }