Пример #1
0
        public async Task <IActionResult> GetValues()
        {
            try
            {
                var values = await _valueService.GetAllAsync();

                return(Ok(values));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message);
                return(StatusCode(500));
            }
        }
Пример #2
0
 public async Task <IActionResult> GetValues()
 {
     return(Ok(await _service.GetAllAsync()));
 }