Пример #1
0
        public async Task <IEnumerable <Reading> > GetAllReadingsAsync()
        {
            Logger.Log.Info("Getting All Readings");

            try
            {
                return(await _readingService.GetAllAsync());
            }
            catch (Exception ex)
            {
                Logger.Log.Error(ex.Message);
                return(null);
            }
        }
Пример #2
0
        public async Task <IActionResult> GetAll()
        {
            var data = await _readingService.GetAllAsync();

            return(Ok(data));
        }
Пример #3
0
 private async void Init()
 {
     Readings = new ObservableCollection <Reading>(await _readingService.GetAllAsync());
 }