TransactR.AzureTableStorage
0.3.2
dotnet add package TransactR.AzureTableStorage --version 0.3.2
NuGet\Install-Package TransactR.AzureTableStorage -Version 0.3.2
<PackageReference Include="TransactR.AzureTableStorage" Version="0.3.2" />
<PackageVersion Include="TransactR.AzureTableStorage" Version="0.3.2" />
<PackageReference Include="TransactR.AzureTableStorage" />
paket add TransactR.AzureTableStorage --version 0.3.2
#r "nuget: TransactR.AzureTableStorage, 0.3.2"
#:package TransactR.AzureTableStorage@0.3.2
#addin nuget:?package=TransactR.AzureTableStorage&version=0.3.2
#tool nuget:?package=TransactR.AzureTableStorage&version=0.3.2
TransactR.AzureTableStorage
TransactR.AzureTableStorage is a library that provides an IMementoStore implementation using Azure Table Storage. It's a highly performant and cost-effective solution for persisting mementos in large-scale applications.
Installation
First, install the NuGet package into your project.
dotnet add package TransactR.AzureTableStorage
Configuration
To use the AzureTableStorageMementoStore, you need to configure it in your Program.cs or Startup.cs file.
You need to provide the Azure Storage account connection string.
// Program.cs
builder.Services.AddAzureTableStorageMementoStore<IlMioStato, int>(
builder.Configuration.GetConnectionString("AzureStorageConnectionString"),
tableName: "mementos"
);
Note: The
tableNameparameter is optional and defaults to"mementos".
Usage Example
After configuring the service, you can inject IMementoStore<IlMioStato, int> into your services or controllers to save and retrieve mementos.
public class IlMioServizio
{
private readonly IMementoStore<IlMioStato, int> _mementoStore;
public IlMioServizio(IMementoStore<IlMioStato, int> mementoStore)
{
_mementoStore = mementoStore;
}
public async Task EseguiOperazioneAsync(string transactionId, IlMioStato stato)
{
// Save a new memento
await _mementoStore.SaveAsync(transactionId, 1, stato);
// Retrieve a memento
var mementoRecuperato = await _mementoStore.RetrieveAsync(transactionId, 1);
// Remove a memento
await _mementoStore.RemoveAsync(transactionId, 1);
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Azure.Core (>= 1.47.3)
- Azure.Data.Tables (>= 12.11.0)
- Azure.Storage.Common (>= 12.24.0)
- TransactR (>= 0.3.2)
-
net9.0
- Azure.Core (>= 1.47.3)
- Azure.Data.Tables (>= 12.11.0)
- Azure.Storage.Common (>= 12.24.0)
- TransactR (>= 0.3.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.