public async Task <IActionResult> OrganisationStatuses(int?providerTypeId)
        {
            var request = new GetOrganisationStatusesRequest {
                ProviderTypeId = providerTypeId
            };

            return(Ok(await _mediator.Send(request)));
        }
예제 #2
0
        public async Task <IEnumerable <OrganisationStatus> > Handle(GetOrganisationStatusesRequest request, CancellationToken cancellationToken)
        {
            _logger.LogInformation($@"Handling Organisation Statuses lookup");

            try
            {
                return(await _repository.GetOrganisationStatusesForProviderTypeId(request.ProviderTypeId));
            }
            catch (Exception ex)
            {
                _logger.LogError("Unable to retrieve Organisation Statuses", ex);
                throw new ApplicationException(ex.Message);
            }
        }