Skip to main content

Convert DynamoDB QueryResponse to a Typed Object

Amazon DynamoDB is Amazons NoSQL database service for any scale.

In the past I've used the method below to convert objects returned from a DynamoDB Query to strongly typed objects.

// Issue request
QueryResponse result = AmazonDynamoDBClient.Query(request);

var items = result.Items.FirstOrDefault();

var doc = Document.FromAttributeMap(items);

var myModel = DynamoDBContext.FromDocument<MyModelType>(doc);

Hello, my name is Lee and I work as a full-stack web developer specialising in Microsoft ASP.NET technologies. I love using Umbraco and also MANAGED, my own application management software.

Contact me at lee.gunn@secretorange.co.uk

All skills

Contact

Get in touch to talk about your project or just ask me a question.

lee.gunn@secretorange.co.uk