Skip to content

Commit

Permalink
update to cache calls to call .toList()
Browse files Browse the repository at this point in the history
  • Loading branch information
JackLewis-digirati committed Mar 1, 2024
1 parent a2480c1 commit a64e90b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private List<DefaultDeliveryChannel> GetDefaultDeliveryChannelsForCustomer(int c
var defaultDeliveryChannels = dlcsContext.DefaultDeliveryChannels
.AsNoTracking()
.Include(d => d.DeliveryChannelPolicy)
.Where(d => d.Customer == customerId);
.Where(d => d.Customer == customerId).ToList();
return defaultDeliveryChannels;
}, cacheSettings.GetMemoryCacheOptions(CacheDuration.Long));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public DeliveryChannelPolicy RetrieveDeliveryChannelPolicy(int customerId, strin
logger.LogDebug("Refreshing {CacheKey} from database", key);
var defaultDeliveryChannels = dlcsContext.DeliveryChannelPolicies
.AsNoTracking().Where(d => d.Customer == customerId || d.Customer == AdminCustomer);
.AsNoTracking().Where(d => d.Customer == customerId || d.Customer == AdminCustomer).ToList();;
return defaultDeliveryChannels;
}, cacheSettings.GetMemoryCacheOptions(CacheDuration.Long));
Expand Down

0 comments on commit a64e90b

Please sign in to comment.