CRUD abstract operations library for Azure Storage Table
Janono.WindowsAzure.Storage.Table
Is still under active development at Is still under active development at
- https://github.com/janusznowak/Janono.WindowsAzure.Storage.Table
- https://dev.azure.com/janono-pub/Janono.WindowsAzure.Storage.Table
Janono.WindowsAzure.Storage.Table?
Janono.Azure.DocumentsDB.Scale is implementation of Crud abstract operations library for Azure Storage Table. By providing contract class is simplify operations. Library is using performance optimized way for bulk operations. So way to use it provide contract class that inherit from AzureTableEntity and it provide CRUD and Bulk operations writing only few lines of code, check example.
Package name | Stable |
---|---|
Janono.WindowsAzure.Storage.Table |
Example of usage Janono.WindowsAzure.Storage.Table
namespace Janono.WindowsAzure.Storage.Table.Example
using System.Collections.Generic;
using Xunit;
public class ExampleOfUsage
{
internal class TestContract : AzureTableEntity
{
}
[Fact]
public void ExampleOfUseBulkOptimizeInsertCreate()
{
string storageAccount = "janonostorage";
string storageKey = System.Environment.GetEnvironmentVariable("storageKey");
string tableName = "testTableNetF";
var stor = new AzureTableStorage<TestContract>(
new AzureTableSettings(
storageAccount: storageAccount,
storageKey: storageKey,
tableName: tableName));
List<TestContract> listtest = new List<TestContract>();
for (int i = 0; i < 20000; i++)
{
var t = new TestContract();
t.PartitionKey = "_";
t.RowKey = i.ToString();
listtest.Add(t);
}
stor.GetTableAsyncCreateIfNotExistsAsync().GetAwaiter().GetResult();
stor.InsertReplace(listtest).GetAwaiter().GetResult();
stor.DeleteIfExistsAsync();
}
}
}
Comments