Пример #1
0
 public async Task <IActionResult> GetActive()
 {
     try
     {
         return(new JsonResult(await _eventProvider.GetActiveEvents()));
     }
     catch (Exception ex)
     {
         _logger.LogError(ex, $"Something went wrong when getting events in {nameof(Get)}");
         return(StatusCode(StatusCodes.Status500InternalServerError));
     }
 }