public async Task <ICollection <PredictionDto> > Handle(GetPredictionsQuery request, CancellationToken cancellationToken) { var predictions = await _repository.GetPredictions(); return(predictions.Select(prediction => new PredictionDto(prediction)).ToList()); }
public async Task <IList <PredictionDTO> > Handle(GetPredictionsQuery request, CancellationToken cancellationToken) { return(await Task.FromResult(PredictionRepository.GetPredictions().Select(x => PredictionDTO.FromDomain(x)).ToList())); }