Пример #1
0
        public void CanGetRange()
        {
            var store = new AzureBigTableStore<HasIdentityAndRange>(connectionString: ConnectionString);
            var item = new HasIdentityAndRange()
            {
                Id = Guid.NewGuid().ToString(),
                RangeKey = "1"
            }; 
            var item2 = new HasIdentityAndRange()
            {
                Id = item.Id,
                RangeKey = "2"
            };
            store.InsertAsync(item).Wait();
            store.InsertAsync(item2).Wait();

            Assert.Equal(2, store.GetRangeAsync(item.Id, "1", "2").Result.Count());
        }
Пример #2
0
        public void CanGetRange()
        {
            var store = new AzureBigTableStore <HasIdentityAndRange>(connectionString: ConnectionString);
            var item  = new HasIdentityAndRange()
            {
                Id       = Guid.NewGuid().ToString(),
                RangeKey = "1"
            };
            var item2 = new HasIdentityAndRange()
            {
                Id       = item.Id,
                RangeKey = "2"
            };

            store.InsertAsync(item).Wait();
            store.InsertAsync(item2).Wait();

            Assert.Equal(2, store.GetRangeAsync(item.Id, "1", "2").Result.Count());
        }
Пример #3
0
        public async Task CanGetRange()
        {
            var store = new AzureBigTableStore <HasIdentityAndRange>(connectionString: ConnectionString);
            var item  = new HasIdentityAndRange()
            {
                Id           = Guid.NewGuid().ToString(),
                RangeKey     = "1",
                ETag         = "\"" + Guid.NewGuid().ToString() + "\"",
                LastModified = DateTimeOffset.Now
            };
            var item2 = new HasIdentityAndRange()
            {
                Id           = item.Id,
                RangeKey     = "2",
                ETag         = "\"" + Guid.NewGuid().ToString() + "\"",
                LastModified = DateTimeOffset.Now
            };
            await store.InsertAsync(item);

            await store.InsertAsync(item2);

            Assert.Equal(2, store.GetRangeAsync(item.Id, "1", "2").Result.Count());
        }