AzureStorageExtensions 2.3.0

Install-Package AzureStorageExtensions -Version 2.3.0
dotnet add package AzureStorageExtensions --version 2.3.0
<PackageReference Include="AzureStorageExtensions" Version="2.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AzureStorageExtensions --version 2.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AzureStorageExtensions, 2.3.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install AzureStorageExtensions as a Cake Addin
#addin nuget:?package=AzureStorageExtensions&version=2.3.0

// Install AzureStorageExtensions as a Cake Tool
#tool nuget:?package=AzureStorageExtensions&version=2.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Basic usage

1. Context

Create Context is easy, just inherit from BaseCloudContext and declear property any types of CloudQueue, CloudBlobContainer, CloudTable, and new generic CloudTable<T>

public class MyContext : BaseCloudContext
    public MyContext(string connectionString) : base(connectionString) { }

    public CloudQueue MyQueue { get; set; }
    public CloudBlobContainer MyBlob { get; set; }
    public CloudTable<MyClass> MyTable { get; set; }
2. CloudTable<T>

The new generic CloudTable allow you to create, retrieve, update, replace, merge, delete, query, and bulk opertations much easier.

var person = await context.Person.RetrieveAsync(partitionKey, rowKey);
await context.Persons.InsertAsync(newPerson);
await context.Persons.InsertOrReplaceAsync(newPerson);
await context.Persons.InsertOrMergeAsync(partialPerson);
await context.Persons.UpdateAsync(person);
await context.Persons.ReplaceAsync(person);
await context.Persons.MergeAsync(partialPerson);
await context.Persons.DeleteAsync(person);

//bulk also support for all operations
await context.Persons.BulkInsertAsync(persons);

//async query also support (required System.Linq.Async)
var children = await (from p in context.Persons.Query()
                      where p.Age <= 18
                      select p)
3. Archive Table

Table (also blob container and queue) can be parition by time. This is suitable for log or temporary data. Just add setting attribute to property in context.

public class MyContext : BaseCloudContext
    public CloudTable<Log> Logs { get; set; }

When new logs insert to table it will be kept based on time.

4. Expandable Table Entity

Azure table limits each property to 64k, but ExpandableTableEntity allows you to keep data up to 1M limit.

public class Log : ExpandableTableEntity 
    public string Message { get; set; } //this message can be up to 1M

NuGet packages (1)

Showing the top 1 NuGet packages that depend on AzureStorageExtensions:

Package Downloads

NLog targets to Azure Table Storage

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.3.0 424 6/3/2020
1.1.3 55,293 6/4/2017
1.1.2 757 6/4/2017
1.1.2-Beta 718 10/1/2016
1.1.1-Beta 19,780 8/5/2016
1.1.0-Beta 687 8/5/2016
1.0.10 5,283 8/5/2016
1.0.9 24,185 1/1/2016
1.0.8 838 1/1/2016
1.0.7 1,193 10/11/2015
1.0.6 858 10/11/2015
1.0.5 1,491 8/8/2015
1.0.4 938 7/18/2015
1.0.3 916 6/27/2015
1.0.2 1,946 2/23/2015
1.0.1 1,344 1/6/2015
1.0.0 4,580 12/20/2014