Cyan is a .NET dynamic client for the Azure Table Storage REST API.

It uses .NET 4 dynamic features to mimic the schema-free properties of the REST API and method names are very similar to the API ones so that you can leverage the existing Azure documentation.

Get it on nuget https://nuget.org/packages/Cyan

v2

Sample usage:

    var client = new CyanClient("my account", "my key");

    // make sure the table has been created
    client.TryCreateTable("MyTable");

    // get a table reference (this does not make any request)
    var table = client["MyTable"];

    // insert an entity
    table.Insert(new
    {
        PartitionKey = "PartitionKey",
        RowKey = "RowKey",
        MyField = "foo bar",
        MyIntField = 1337
    });

    // get an entity
    var entity = table.Query("PartitionKey", "RowKey").First();

    // update
    entity.MyField = "new value";
    table.Update(entity);

    // delete
    table.Delete(entity);

v1

Sample usage:

    var client = new CyanTableClient("my account", "account secret");

    // create a table
    client.TryCreateTable("MyTable");

    // insert an entity
    var entity = client.Insert("MyTable", new
        {
            PartitionKey = "PartitionKey",
            RowKey = "RowKey",
            MyField = "foo bar",
            MyIntField = 1337
        });

    // get an entity
    var entity = client.Query("MyTable", "PartitionKey", "RowKey").First();

    // update
    entity.MyField = "new value";
    client.Update("MyTable", entity);

    // delete
    client.Delete("MyTable", entity);

Last edited Jun 13, 2012 at 6:06 PM by maghis, version 28