In the previous section, we looked at an overview of the cart service's project structure. We learned how the cart service stores information inside a Redis instance and how it retrieves cart-related data for the client.
It is necessary to note that there is a gap between the information stored in the Redis data source and the data that's exposed by the service. Furthermore, by examining the CartItem entity, we can see that it only implements and retrieves CartItemId and Quantity information for the item:
namespace Cart.Domain.Entities
{
public class CartItem
{
public string CartItemId { get; set; }
public int Quantity { get; set; }
...
}
}
On the other hand, we can see that CartItemResponse provides a lot of fields related to the item's data:
namespace Cart.Domain.Responses...