Beispiel #1
0
        public async Task <IActionResult> GetServiceMethods()
        {
            var getServiceMethodsQuery = new GetServiceMethodsQuery();

            var result = await _mediator.Send(getServiceMethodsQuery, new CancellationToken()).ConfigureAwait(false);

            if (result == null)
            {
                return(NotFound());
            }

            return(Ok(result));
        }
Beispiel #2
0
        public async Task <IEnumerable <ServiceMethodQueryModel> > Handle(GetServiceMethodsQuery request, CancellationToken cancellationToken)
        {
            var serviceMethods = await _serviceMethodQueryRepository.GetAllServiceMethods().ConfigureAwait(false);

            return(serviceMethods);
        }