I was using dynamodb Object Persistence model.
DynamoDBTable("mydynamodbtablename")]
public class mytable
{
....
}
problem is now if I tried to make the name of the table to change dynamically in runtime (I get table names through config files), I get errors
var Table_Name = Config.GetTableName();
DynamoDBTable(Table_Name)]
public class mytable
{
....
}
error: An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type xxx
Is there a way (easy way) so that I can still use DDB Object Persistence Model and make tables name dynamic?
Update:
It seems that I didn't mentioned ddb persistence model clearly. Here is the official document http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/CRUDHighLevelExample1.html
and here is an example of how in real practice do we use object persistence model
var records = await context.LoadAsync<mytable>(somekey);
foreach(var item in records)
{
....
}