コード例 #1
0
        public async Task SaveAsync()
        {
            _cacheManager.Remove(QuoteRequestCacheKey, _quoteRequestCacheRegion);

            var quoteDto = _quoteRequest.ToServiceModel();

            if (_quoteRequest.IsTransient())
            {
                await _quoteApi.QuoteModuleCreateAsync(quoteDto);
            }
            else
            {
                await _quoteApi.QuoteModuleUpdateAsync(quoteDto);
            }
        }
コード例 #2
0
        public async Task SaveAsync()
        {
            _cacheManager.Remove(GetQuoteRequestCacheKey(_quoteRequest.StoreId, _quoteRequest.CustomerId), _quoteRequestCacheRegion);

            var quoteDto = _quoteRequest.ToServiceModel();

            if (_quoteRequest.IsTransient())
            {
                await _quoteApi.QuoteModuleCreateAsync(quoteDto);
            }
            else
            {
                await _quoteApi.QuoteModuleUpdateAsync(quoteDto);
            }

            await _quoteRequestUpdatedEventPublisher.PublishAsync(new QuoteRequestUpdatedEvent(_quoteRequest));
        }