Ejemplo n.º 1
0
        /// <summary>
        /// Load the element from the model with its code
        /// </summary>
        /// <param name="code">Element id</param>
        private async void LoadElementAsync(int code)
        {
            IsLoading = true;

            Element = await _model.GetAsync(code);

            IsLoading = false;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Load the elements list from the model
        /// </summary>
        private async Task LoadElementsAsync()
        {
            IsLoading = true;

            IList <T> elements = await _model.GetAsync();

            Elements = new ObservableCollection <T>(elements);

            IsLoading = false;
        }