public IEnumerable <StreamDto> GetAll() { var streamsList = _repository.GetAll(); var streams = _mapper.Map <IEnumerable <Stream>, IEnumerable <StreamDto> >(streamsList); return(streams); }
public async Task <IActionResult> GetAllStreams() { IEnumerable <Stream> streams = await _streamRepository.GetAll(); if (streams == null) { return(new NotFoundResult()); } else { return(new OkObjectResult(streams)); } }