Creating a custom object for the DynamoDB table using the object persistence model in .Net

Now, we will see how to use the object persistence model in .Net to create a custom object.

Getting ready

To perform this recipe, you should have set up the project, as described in the earlier recipes, specifically, pom.xml, dependencies, and the object model.

How to do it…

The object persistence model for .Net only supports primitive data types to be used as attribute data types. But, sometimes, we might want to use some custom objects. In order to do so, we need to perform the following operations:

  1. Declare the product class as we did earlier. We also need to create the custom object class and declare this class in the product class. In this case, we want to ...

Get DynamoDB Cookbook 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.