AzureStorageExtensions 2.3.0

Extensions for Azure Storage Client librar

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.

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&lt;T&gt;

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)
               .AsAsyncTableQuery()
               .ToListAsync();
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
{
    [Setting(Period=Period.Month)]
    public CloudTable<Log> Logs { get; set; }
}

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

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
}

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&lt;T&gt;

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)
               .AsAsyncTableQuery()
               .ToListAsync();
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
{
    [Setting(Period=Period.Month)]
    public CloudTable<Log> Logs { get; set; }
}

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

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.Azure
NLog targets to Azure Table Storage

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.3.0 74 6/3/2020
1.1.3 44,722 6/4/2017
1.1.2 458 6/4/2017
1.1.2-Beta 442 10/1/2016
1.1.1-Beta 14,634 8/5/2016
1.1.0-Beta 412 8/5/2016
1.0.10 4,958 8/5/2016
1.0.9 12,422 1/1/2016
1.0.8 528 1/1/2016
1.0.7 873 10/11/2015
1.0.6 540 10/11/2015
1.0.5 852 8/8/2015
1.0.4 570 7/18/2015
1.0.3 605 6/27/2015
1.0.2 1,290 2/23/2015
1.0.1 647 1/6/2015
1.0.0 3,356 12/20/2014