コード例 #1
0
        public async Task <IActionResult> GetAllMatches()
        {
            var getMatches = new GetHeadToHeadMatches();
            var matches    = await _mediator.Send(getMatches);

            return(Ok(matches));
        }
コード例 #2
0
        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));
        }