public void SetUp()
        {
            var configuration = new DynamoDbEntityConfiguration();

            configuration.AddFieldConfiguration(new FieldConfiguration("FooName", typeof(string)));

            configuration.AddFieldConfiguration(new FieldConfiguration("Bars", typeof(IEnumerable <Bar>), true, new List <FieldConfiguration> {
                new FieldConfiguration("BarName", typeof(string))
            }, accessStrategy: AccessStrategy.CamelCaseUnderscoreName));

            Mapper = new DynamoDbMapper <Foo>(configuration);

            _documentFoo            = new Document();
            _documentFoo["FooName"] = "TheFooName";

            var documentBar1 = new Document();

            documentBar1["BarName"] = "BarName1";

            var documentBar2 = new Document();

            documentBar2["BarName"] = "BarName2";

            _documentFoo["Bars"] = new List <Document> {
                documentBar1, documentBar2
            };
        }
Example #2
0
        public void SetUp()
        {
            var configuration = new DynamoDbEntityConfiguration();

            configuration.AddFieldConfiguration(new FieldConfiguration("Title", typeof(string)));

            _mapper = new DynamoDbMapper <Foo>(configuration);
        }
        public DynamoDbStore()
        {
            var rootConfiguration = LoadConfiguration <TEntity>();

            _amazonDynamoDbClient = new AmazonDynamoDBClient();
            _entityTable          = Table.LoadTable(_amazonDynamoDbClient, rootConfiguration.TableName);
            _mapper = new DynamoDbMapper <TEntity>(rootConfiguration.DynamoDbEntityConfiguration);
        }
Example #4
0
        public void SetUp()
        {
            var configuration = new DynamoDbEntityConfiguration();

            configuration.AddFieldConfiguration(new FieldConfiguration("Gender", typeof(Gender),
                                                                       propertyConverter: new DynamoDbConverterEnum <Gender>()));

            _mapper = new DynamoDbMapper <Foo>(configuration);
        }
        public virtual void SetUp()
        {
            var configuration = new DynamoDbEntityConfiguration();

            configuration.AddFieldConfiguration(new FieldConfiguration("FooName", typeof(string)));

            configuration.AddFieldConfiguration(new FieldConfiguration("Bars", typeof(IEnumerable <Bar>), true, new List <FieldConfiguration> {
                new FieldConfiguration("BarName", typeof(string))
            }, accessStrategy: AccessStrategy.CamelCaseUnderscoreName));

            configuration.AddFieldConfiguration(new FieldConfiguration("Other", typeof(Other), true, new List <FieldConfiguration> {
                new FieldConfiguration("OtherName", typeof(string))
            }));

            Mapper = new DynamoDbMapper <Foo>(configuration);
        }
Example #6
0
        public virtual void SetUp()
        {
            var configuration = new DynamoDbEntityConfiguration();

            configuration.AddFieldConfiguration(new FieldConfiguration("FooName", typeof(string)));
            configuration.AddFieldConfiguration(new FieldConfiguration("Bar", typeof(Bar), true,
                                                                       new List <FieldConfiguration>
            {
                new FieldConfiguration("BarName", typeof(string)),
                new FieldConfiguration("Other", typeof(Other), true, new List <FieldConfiguration>
                {
                    new FieldConfiguration("OtherName", typeof(string))
                })
            }));

            Mapper = new DynamoDbMapper <Foo>(configuration);
        }