public async Task SaveAsync() { _cacheManager.Remove(QuoteRequestCacheKey, _quoteRequestCacheRegion); var quoteDto = _quoteRequest.ToServiceModel(); if (_quoteRequest.IsTransient()) { await _quoteApi.QuoteModuleCreateAsync(quoteDto); } else { await _quoteApi.QuoteModuleUpdateAsync(quoteDto); } }
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)); }