Pavel Safronov, a developer on our SDK and Tools team, sent the following guest post my way!
The AWS SDK for .NET provides a simple client for our new service, Amazon DynamoDB. This client gives you a straight-forward way to interface with this Internet-scale NoSQL database service. But what you might not know is that the SDK also provides an object persistence framework for Amazon DynamoDB.
The object persistence framework enables you to define and use .NET classes like the one shown below to represent and manage data in Amazon DynamoDB. The framework—specifically the DynamoDBContext object—takes care of all the nitty-gritty details of marshalling and unmarshalling your data from .NET objects to Amazon DynamoDB attributes. All you need to do is define the classes and treat them like any other .NET data types.
As you can see, the class has a few attributes marking it up. These attributes specify the table to store the data in, the keys for the table, and which properties should either not be stored or be stored using a different name than in the class. These attributes are all you need to add to your code to seamlessly interact with Amazon DynamoDB.
The sample below shows basic CRUD (Create, Read, Update, Delete) operations that can be performed on these objects. Using the object persistence framework is as simple as making a Save or a Load call!
This article provides an in-depth walkthrough of using the object persistence framework to design a sample movie-tracking application. The article discusses the data structure aspects of the application, provides a sample schema, and shows the various interactions with Amazon DynamoDB.
Software Development Engineer
PS: We are hiring software development engineers and product managers. If you are passionate about enabling developers to use AWS, get in touch with us at email@example.com.