Skip to content

Instantly share code, notes, and snippets.

@awswithdotnet
Last active March 2, 2022 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awswithdotnet/d8302bf95b93da82e173673ebb4a821a to your computer and use it in GitHub Desktop.
Save awswithdotnet/d8302bf95b93da82e173673ebb4a821a to your computer and use it in GitHub Desktop.
DynamoDB DynamoDB DynamoDBClientFactory Complete
public class DynamoDBClientFactory : IDataClientFactory<AmazonDynamoDBClient>
{
private readonly IDataConnectionSettingsFactory<AmazonDynamoDBConfig> _dataConnectionSettingsFactory;
public DynamoDBClientFactory(IDataConnectionSettingsFactory<AmazonDynamoDBConfig> dataConnectionSettingsFactory){
_dataConnectionSettingsFactory = dataConnectionSettingsFactory;
}
public AmazonDynamoDBClient GetClient()
{
AmazonDynamoDBConfig amazonDynamoDBConfig = _dataConnectionSettingsFactory.GetSettings();
AmazonDynamoDBClient client = new AmazonDynamoDBClient(amazonDynamoDBConfig);
return client;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment