コード例 #1
0
        public async Task <IActionResult> GetAll()
        {
            var request = new GetAllAssociationRequest();
            var result  = await _mediatorService.Send(request);

            return(Ok(result));
        }
コード例 #2
0
 public async Task <List <GetAssociationDto> > Handle(GetAllAssociationRequest request, CancellationToken cancellationToken)
 {
     return(await _context.Set <Association>()
            .ProjectTo <GetAssociationDto>(_mapper.ConfigurationProvider)
            .ToListAsync(cancellationToken));
 }