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)); }
public async Task <IEnumerable <ServiceMethodQueryModel> > Handle(GetServiceMethodsQuery request, CancellationToken cancellationToken) { var serviceMethods = await _serviceMethodQueryRepository.GetAllServiceMethods().ConfigureAwait(false); return(serviceMethods); }