Devlooped.TableStorage 1.3.0 Prefix Reserved

There is a newer version of this package available.
See the version list below for details.
Install-Package Devlooped.TableStorage -Version 1.3.0
dotnet add package Devlooped.TableStorage --version 1.3.0
<PackageReference Include="Devlooped.TableStorage" Version="1.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Devlooped.TableStorage --version 1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Devlooped.TableStorage, 1.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 Devlooped.TableStorage as a Cake Addin
#addin nuget:?package=Devlooped.TableStorage&version=1.3.0

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

Repository pattern with POCO object support for storing to Azure/Cosmos DB Table Storage.
     
Usage:

Given the following class:

 [Table("Products")]
 class Product
 {
   // NOTE: custom constructor
   public Product(string category, string id)
   {
     Category = category;
     Id = id;
   }

   // NOTE: read-only property
   [PartitionKey]
   public string Category { get; }  

   [RowKey]
   public string Id { get; }

   public string? Title { get; set; }

   public double Price { get; set; }
 }

It can be persisted and retrieved with:

 var account = CloudStorageAccount.DevelopmentStorageAccount; // or production one
 var repo = TableRepository.Create<Product>(storageAccount);

 var product = new Product("catId-asdf", "1234")
 {
   Title = "Table Storage is Cool",
   Price = 25.5,
 };

 // Insert or Update behavior (aka "upsert")
 await repo.PutAsync(product);

 // Enumerate all products in category "catId-asdf"
 await foreach (var p in repo.EnumerateAsync("catId-asdf")
    Console.WriteLine(p.Price);

 // Get previously saved product.
 Product saved = await repo.GetAsync("catId-asdf", "1234");

 // Delete product
 await repo.DeleteAsync("catId-asdf", "1234");

 // Can also delete passing entity
 await repo.DeleteAsync(saved);
   

Built from https://github.com/devlooped/TableStorage/tree/3756104bc

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Devlooped.TableStorage:

Package Downloads
Devlooped.TableStorage.Protobuf

A Protocol Buffers binary serializer for use with document-based repositories. Usage: var repo = DocumentRepository.Create<Product>(storageAccount, serializer: ProtobufDocumentSerializer.Default); Built from https://github.com/devlooped/TableStorage/tree/fa6f01fed

Devlooped.TableStorage.MessagePack

A MessagePack binary serializer for use with document-based repositories. Usage: var repo = DocumentRepository.Create<Product>(storageAccount, serializer: BsonDocumentSerializer.Default); Built from https://github.com/devlooped/TableStorage/tree/fa6f01fed

Devlooped.TableStorage.Bson

A BSON binary serializer for use with document-based repositories. Usage: var repo = DocumentRepository.Create<Product>(storageAccount, serializer: BsonDocumentSerializer.Default); Built from https://github.com/devlooped/TableStorage/tree/fa6f01fed

Devlooped.TableStorage.Newtonsoft

A Newtonsoft.Json-based serializer for use with document-based repositories. Usage: var repo = DocumentRepository.Create<Product>(storageAccount, serializer: JsonDocumentSerializer.Default); Built from https://github.com/devlooped/TableStorage/tree/fa6f01fed

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.1.1 500 8/29/2021
3.1.0 458 8/13/2021
3.0.3 432 7/28/2021
3.0.2 515 7/1/2021
2.0.2 513 6/23/2021
2.0.1 524 6/17/2021
2.0.0 477 6/16/2021
1.3.0 452 5/31/2021
1.2.1 167 5/29/2021
1.2.0 213 5/26/2021
1.0.4 277 5/16/2021