public async Task <OrderQueryModel> Handle(GetOrderByIdQuery request, CancellationToken cancellationToken) { var order = await _orderRepository.GetOrderById(request.Id).ConfigureAwait(false); var orderedProduct = await _productRepository.GetProductById(order.ProductId).ConfigureAwait(false); var orderedServiceMethod = await _serviceMethodRepository.GetServiceMethodById(order.ServiceMethodId).ConfigureAwait(false); return(MapQueryModel(order, orderedProduct, orderedServiceMethod)); }
private async Task <ServiceMethodQueryModel> GetOrderedServiceMethod(Guid serviceMethodId) { return(await _serviceMethodRepository.GetServiceMethodById(serviceMethodId).ConfigureAwait(false)); }