The ICartRepository Redis implementation

The cart service uses Redis (https://redis.io/) to store the cart's data. The actual implementation of the CartRepository class of the cart service uses a NuGet package powered by Stack Exchange called StackExchange.Redis. Furthermore, we will use the Newtonsoft.Json package to serialize the objects into Redis using JSON format.

The concrete implementation of the CartRepository class will be located in the Cart.Infrastructure project, while the ICartRepository interface type will be located in the Cart.Domain project. Furthermore, the Cart.Infrastructure project will also depend on the StackExchange.Redis and Newtonsoft.Json packages. The StackExchange.Redis library provides a low-level abstraction ...

Get Hands-On RESTful Web Services with ASP.NET Core 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.