My data model looks like this:
[DynamoDBTable("prices")]
public class Price
{
[DynamoDBHashKey("id")]
public String Id { get; set; }
[DynamoDBProperty("symbol")]
public string Symbol { get; set; }
[DynamoDBProperty("expdate")]
public long ExpDate { get; set; }
}
I'm trying to query DynamoDB using QueryAsync like this:
var q = db.QueryAsync<Price>("ID");
I'm always getting a InvalidOperationException despite only using the partition key to query my table.
System.InvalidOperationException: 'Must have one range key or a GSI index defined for the table prices'
Why am I getting this error and what can I do to resolve it?
Thanks
AmazonDynamoDBClientbut notDynamoDBContextwhen a sort key isn't defined?docs.aws.amazon.com/amazondynamodb/latest/developerguide/…