public async Task <IActionResult> GetAllMatches() { var getMatches = new GetHeadToHeadMatches(); var matches = await _mediator.Send(getMatches); return(Ok(matches)); }
public async Task <IEnumerable <HeadToHeadMatchInfoReadDto> > Handle(GetHeadToHeadMatches request, CancellationToken cancellationToken = default(CancellationToken)) { var matches = await _context.HeadToHeadMatches.FetchWithExperts(FetchMode.ForRead).ToListAsync(cancellationToken); return(_mapper.Map <IEnumerable <HeadToHeadMatchInfoReadDto> >(matches)); }