Пример #1
0
        public async Task <IActionResult> GetAll()
        {
            var request = new GetAllActivityQueryRequest();

            var response = await _mediator.Send(request, HttpContext.RequestAborted);

            return(Ok(response));
        }
Пример #2
0
        public async Task <IReadOnlyCollection <Activity> > Handle(GetAllActivityQueryRequest request, CancellationToken cancellationToken)
        {
            var response = await _context.Activities.ToListAsync(cancellationToken);

            return(response);
        }