I have a .NET Core 2.0 project using AWSDynamodDb (you can ignore dynamo db here as question is not regarding dynamodDB)
I have the following entity class as:
[DynamoDBTable("TableName")]
public class MyData
{
[DynamoDBHashKey]
public string Id{ get; set; }
public string Name{ get; set; }
}
What I want is the "TableName" - the value passed into the attribute - to be populated from my appSettings.json file.
{
"TableName": "NewTable"
}
Would it be possible to get this value durring runtime by looking at the key from appSettings file?
--Updated--
I am calling the "MyData" class from my controller as below:
var response = await context.ScanAsync<MyData>(conditions).GetRemainingAsync();
[DynamoDBTable]attribute using the configuration file?ConfigurationPropertyAttributedecoration that was available in the .NetFramework