Closed
Description
Describe the bug
[DynamoDBTable("test-table")]
class ExternalTable
{
...
}
var dynamoDbContext = new DynamoDBContext(new DynamoDBContextConfig
{
TableNamePrefix = "my-prefix-"
});
dynamoDbContext.SaveAsync(new ExternalTable { }, new DynamoDBOperationConfig
{
TableNamePrefix = "",
OverrideTableName = "external-table"
});
Expected Behavior
Since I have explicitly set TableNamePrefix to empty string, I would expect it to be empty, there SaveAsync would happen for "external-table" table name.
Current Behavior
TableNamePrefix = ""
is ignored. SaveAsync is attempted for "my-prefix-external-table" table name.
Possible Solution
Create a separate context.
Additional Information/Context
DynamoDBFlatConfig uses string.IsNullOrEmpty
comparison, therefore empty string is simply ignored.
AWS .NET SDK and/or Package version used
3.7.402.7
Targeted .NET Platform
.NET 8
Operating System and version
AmazonLinux