AzureStorageExtensions 2.3.0
dotnet add package AzureStorageExtensions --version 2.3.0
NuGet\Install-Package AzureStorageExtensions -Version 2.3.0
<PackageReference Include="AzureStorageExtensions" Version="2.3.0" />
paket add AzureStorageExtensions --version 2.3.0
#r "nuget: AzureStorageExtensions, 2.3.0"
// 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
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)
.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
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.Azure.Cosmos.Table (>= 1.0.7)
- Microsoft.Azure.Storage.Blob (>= 11.1.4)
- Microsoft.Azure.Storage.Queue (>= 11.1.4)
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 | Downloads | Last updated |
---|---|---|
2.3.0 | 1,741 | 6/3/2020 |
1.1.3 | 67,172 | 6/4/2017 |
1.1.2 | 1,705 | 6/4/2017 |
1.1.2-Beta | 1,513 | 10/1/2016 |
1.1.1-Beta | 26,551 | 8/5/2016 |
1.1.0-Beta | 1,428 | 8/5/2016 |
1.0.10 | 6,253 | 8/5/2016 |
1.0.9 | 28,595 | 1/1/2016 |
1.0.8 | 1,825 | 1/1/2016 |
1.0.7 | 2,162 | 10/11/2015 |
1.0.6 | 1,814 | 10/11/2015 |
1.0.5 | 2,466 | 8/8/2015 |
1.0.4 | 1,879 | 7/18/2015 |
1.0.3 | 1,854 | 6/27/2015 |
1.0.2 | 2,902 | 2/23/2015 |
1.0.1 | 2,286 | 1/6/2015 |
1.0.0 | 6,176 | 12/20/2014 |