예제 #1
0
        private async Task <bool> HandleServiceCompleted(string message)
        {
            var receivedShipServiceObject = JsonSerializer.Deserialize <ShipServiceCompletedMessageEvent>(message);
            var invoice = await _invoiceRepository.GetLastInvoiceForCustomer(receivedShipServiceObject.CustomerId);

            await _invoiceRepository.AddShipServiceLineAsync(invoice.Id.ToString(), receivedShipServiceObject.ShipId, receivedShipServiceObject.ServiceId);

            return(true);
        }