예제 #1
0
        /// <summary>
        /// Handles the request to query all ServiceRequest entities.
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns>List of all ServiceRequests</returns>
        public async Task <IEnumerable <ServiceRequest> > Handle(QueryAllServiceRequests request, CancellationToken cancellationToken)
        {
            _logger.LogInformation("Querying All Service Requests - Request: {@Request}", request);

            var response = await _serviceRequestRepository.RetrieveAllAsync();

            _logger.LogInformation("Queried All Service Requests - ServiceRequests: {@ServiceRequests}", response);

            return(response);
        }