public async Task <IActionResult> GetAll([FromRoute] GetAllStadiumsQuery request) { _logger.LogInformation(LoggingEvents.ListItems, "Getting all stadiums"); var stadiums = await CommandAsync(request); if (stadiums == null) { _logger.LogWarning(LoggingEvents.GetItemNotFound, "Stadiums not found"); return(NotFound()); } return(Ok(stadiums)); }
public async Task <IEnumerable <StadiumDTO> > Handle(GetAllStadiumsQuery request, CancellationToken cancellationToken) => await _service.GetAllAsync();