The basket module wants to cache existing products. We can achieve this in different ways. In this case, we create the following Product class that we persist in the database: namespace REPR.Baskets.Data;public record class Product(int Id); To make use of it, we must expose the following property from the BasketContext class: public DbSet<Product> Products => Set<Product>(); Then, we can start to leverage this cache. Firstly, we must populate it when the catalog module creates a product and remove that product when deleted. The ProductEventsConsumers class handles both events. Here’s the skeleton of this class: using REPR.Products.Contracts;namespace REPR.Baskets.Features;public class ProductEventsConsumers :…