Skip to content
This repository was archived by the owner on Dec 11, 2020. It is now read-only.
Jef King edited this page Jun 7, 2017 · 1 revision

Initialize

var table = new TableStorage("Table", "UseDevelopmentStorage=true");
await table.CreateIfNotExists();

Store

Entity

var entity = new TableEntity();
await table.Insert(entity);

Entities

var entities = new List<TableEntity>();
await table.InsertOrReplace(entities);

Dictionary

var entity = new Dictionary<string, object>();
entity.Add("PartitionKey", "MyPartition");
entity.Add("RowKey", "MyRow");
entity.Add("CustomValue", Guid.NewGuid());
await storage.InsertOrReplace(entity);

Dictionaries

var dictionaries = new List<IDictionary<string, object>>();
await table.InsertOrReplace(dictionaries);

Query

Partition & Row

await table.QueryByPartitionAndRow<Model>("partition", "key");

Partition

await table.QueryByPartition<Model>("partition");

Row

await table.QueryByRow<Model>("key");

Generic

await table.Query<Model>(new TableQuery<Model>());

Clone this wiki locally