Last active
March 2, 2022 18:26
-
-
Save awswithdotnet/d8302bf95b93da82e173673ebb4a821a to your computer and use it in GitHub Desktop.
DynamoDB DynamoDB DynamoDBClientFactory Complete
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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