Exemplo n.º 1
0
    public static void Main(string[] args)
    {
        IOrm orm = null;

        IDynamodbClient dynamodbClient = null;

        IProductRepository productRepo = new ProductDatabaseRepository(orm);

        ICustomerRepository customerRepo = new CustomerDatabaseRepository(orm);

        Product p1 = productRepo.GetById(3);

        Customer c1 = customerRepo.GetById(49);

        productRepo = new ProductDynamodbRepository(dynamodbClient);

        customerRepo = new CustomerDynamodbRepository(dynamodbClient);

        p1 = productRepo.GetById(3);

        c1 = customerRepo.GetById(49);

        Console.WriteLine("Hello World");
    }
Exemplo n.º 2
0
 public DynamodbRepositoryBase(IDynamodbClient dynamodbClient, string tableName, string hashKey)
 {
     _dynamodbClient = dynamodbClient;
     _tableName      = tableName;
     _hashKey        = hashKey;
 }
Exemplo n.º 3
0
 public CustomerDynamodbRepository(IDynamodbClient dynamodbClient) : base(dynamodbClient, "Customer", "id")
 {
 }
 public ProductDynamodbRepository(IDynamodbClient dynamodbClient) : base(dynamodbClient, "Product", "id")
 {
 }