Blog.Mobile.ViewModels.Login.LoginViewModel.ExecuteLoginCommand C# (CSharp) Method

ExecuteLoginCommand() protected method

protected ExecuteLoginCommand ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        protected async Task ExecuteLoginCommand()
        {
            var result = await _accountService.Login(_username, _password);
            if (result)
            {
                App.IsLoggedIn = true;
                await _navigation.PopModalAsync();
            }
            else
            {
                await _page.DisplayAlert("Error!", "Username or password is incorrect.", "Ok");
            }
        }
    }