StupendousCounter.Core.ViewModel.CounterViewModel.SaveAsync C# (CSharp) Method

SaveAsync() private method

private SaveAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        private async Task SaveAsync()
        {
            if (string.IsNullOrEmpty(Name))
            {
                await _dialogService.ShowError("The name must be set", "No name", "OK", null);
                return;
            }

            if (string.IsNullOrEmpty(Description))
            {
                await _dialogService.ShowError("The description must be set", "No description", "OK", null);
                return;
            }

            _counter.Name = Name;
            _counter.Description = Description;
            await _databaseHelper.AddOrUpdateCounterAsync(_counter);
            _navigationService.GoBack();
        }