Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
        public async Task <IActionResult> GetAll()
        {
            var data = await _readingService.GetAllAsync();

            return(Ok(data));
        }
Exemplo n.º 3
0
 private async void Init()
 {
     Readings = new ObservableCollection <Reading>(await _readingService.GetAllAsync());
 }