C
C#2y ago
Hulkstance

❔ DynamoDB records are not being added

Do you see anything wrong because CreateAsync returns status code 200, but nothing really is being added. DI
services.AddSingleton<IDynamoDbClientFactory>(provider =>
{
var cfg = provider.GetRequiredService<IOptions<DynamoDbConfiguration>>();

return configuration.GetValue<bool>($"{Constants.AwsDynamoDb}:UseDynamoDbLocal")
? new DynamoDbLocalClientFactory(cfg)
: new DynamoDbClientFactory.DynamoDbClientFactory(configuration);
});

services.AddSingleton<IUserTradeRepository, DynamicClientUserTradeRepositoryAdapter>();
services.AddSingleton<IDynamoDbClientFactory>(provider =>
{
var cfg = provider.GetRequiredService<IOptions<DynamoDbConfiguration>>();

return configuration.GetValue<bool>($"{Constants.AwsDynamoDb}:UseDynamoDbLocal")
? new DynamoDbLocalClientFactory(cfg)
: new DynamoDbClientFactory.DynamoDbClientFactory(configuration);
});

services.AddSingleton<IUserTradeRepository, DynamicClientUserTradeRepositoryAdapter>();
Code is a bit long and unable to paste it here: https://hastebin.com/huwixopaja.csharp
Hastebin: Send and Save Text or Code Snippets for Free | Toptal®
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
2 Replies
Hulkstance
HulkstanceOP2y ago
ugh, nvm. They actually were added. I guess UI didn't refresh for some reason or something. anyway, let me know if there is something that could be done in a better way
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server