Esempio n. 1
0
        }                                                //#D

        public void HandleEvent
            (LocationChangedEvent domainEvent)                              //#E
        {
            var salesTaxPercent = _taxLookupService                         //#F
                                  .GetSalesTax(domainEvent.Location.State); //#F

            foreach (var quote in _context.Quotes.Where(                    //#G
                         x => x.WhereInstall == domainEvent.Location))      //#G
            {
                quote.SalesTaxPercent = salesTaxPercent;                    //#G
            }
        }
Esempio n. 2
0
        public void HandleEvent(QuoteLocationChangedEvent domainEvent)
        {
            var salesTaxPercent = _taxLookupService.GetSalesTax(domainEvent.NewLocation?.State);

            domainEvent.QuoteToUpdate.SalesTaxPercent = salesTaxPercent;
        }