Amazon DynamoDB
Developer Guide (API Version 2012-08-10)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Using the AWS SDK for .NET

The AWS SDK for .NET provides the following APIs to work with Amazon DynamoDB. All the APIs are available in the AWSSDK.dll. For information about downloading the AWS SDK for .NET, go to Sample Code Libraries.

Note

The low-level API and high-level API provide thread-safe clients for accessing Amazon DynamoDB. As a best practice, your applications should create one client and reuse the client between threads.

APIComment

Low-level API

This is the protocol level API that maps closely to the Amazon DynamoDB API. You can use the low-level API for all table and item operations such as create, update, delete table and items. You can also query and scan your tables.

For more information about the Amazon DynamoDB, see Using the Amazon DynamoDB API.

The API is available in the Amazon.DynamoDB.DataModel namespace.

The following sections describe the low-level API in various AWS SDKs and also provide working samples:

Helper API

Provides wrapper classes around the low-level API to further simplify your programming task. The Table and Document are the key wrapper classes.

You can use the helper API for the data operations such as create, retrieve, update and delete items. To create, update and delete tables, you must use the low-level API.

The API is available in the Amazon.DynamoDB.DocumentModel namespace.

For more information about the helper API and working samples, see Using the .NET Helper Classes in Amazon DynamoDB.

Object Persistence Model API

The object persistence model API enables you to map your client-side classes to the Amazon DynamoDB tables. Each object instance then maps to an item in the corresponding tables. The DynamoDBContext class in this API provides methods for you to save client-side objects to a table, retrieve items as objects and perform query and scan.

You can use the object persistence model for the data operations such as create, retrieve, update and delete items. You must first create your tables using the low-level API and then use the object persistence model to map your classes to the tables.

The API is available in the Amazon.DynamoDB.DataModel namespace.

For more information about the helper API and working samples, see Using the AWS SDK for .NET Object Persistence Model with Amazon DynamoDB.

Configuring the .NET CLR

For the best performance of your server-based applications with the AWS SDK for .NET, we recommend that you use Server mode garbage collection (GC).

To enable Server mode GC, add the following to your app.config file:

<runtime>
    <gcServer enabled="true" />
    <gcConcurrent enabled="true"/>
</runtime>

Note

Server mode GC works only on systems with multiple processors or processor cores. Enabling Server mode GC has no effect otherwise.