Esempio n. 1
0
        public string Read(string key)
        {
            TableRow row = _tableStorage.GetAsync(_tableName, _partitionKey, key).Result;

            if (row == null)
            {
                return(null);
            }

            return(row["value"]);
        }
Esempio n. 2
0
        public async Task DeleteRows_AddTwoRows_DeletedDisappears()
        {
            var row1 = new TableRow("part1", "1")
            {
                ["col1"] = "value1"
            };
            var row2 = new TableRow("part1", "2")
            {
                ["col1"] = "value2"
            };
            await _tables.InsertAsync(_tableName, new[] { row1, row2 });

            await _tables.DeleteAsync(_tableName, new[] { new TableRowId("part1", "2") });

            IEnumerable <TableRow> rows = await _tables.GetAsync(_tableName, "part1");

            Assert.Single(rows);
        }