Exemplo n.º 1
0
        /// <summary>
        /// Async data loading during initialization
        /// </summary>
        /// <returns></returns>
        protected override async Task InitializeAsync()
        {
            try
            {
                IsLoading = true;
                var EmployeeList = await _employeeApiService.GetAll();

                Employees = new ObservableCollection <EmployeeDto>(EmployeeList);
            }
            catch (Exception e)
            {
                _loggingService.LogFatal("Error during Initialization!", e);
                _dialogService.ShowError(e.Message);
            }
            finally
            {
                IsLoading = false;
            }
        }