public async Task <BirdListDto> Handle(GetBirdsQuery request, CancellationToken cancellationToken) { var allBirds = await _birdRepository.GetAll(); return(new BirdListDto { Birds = allBirds.Select(bird => new BirdDto { Id = bird.Id, Latin = bird.LatinName, Name = bird.EnglishName }).ToList() // TODO: add Automapper! }); }
public void OnGet() { Birds = _birdsRepo.GetAll(); }