AzureEntityServices.Queries 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package AzureEntityServices.Queries --version 1.0.3                
NuGet\Install-Package AzureEntityServices.Queries -Version 1.0.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AzureEntityServices.Queries" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AzureEntityServices.Queries --version 1.0.3                
#r "nuget: AzureEntityServices.Queries, 1.0.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AzureEntityServices.Queries as a Cake Addin
#addin nuget:?package=AzureEntityServices.Queries&version=1.0.3

// Install AzureEntityServices.Queries as a Cake Tool
#tool nuget:?package=AzureEntityServices.Queries&version=1.0.3                

Azure Entity Services

Manage your entities in Azure Storage without tears !

What is Azure Entity Services?

Azure Entity Services is an abstraction layer library which help you to store, query, update any entities classes in Azure Storage Table and Blob

This library was written in C# Core and based on official Azure SDK

Focused on performance and productity

The library was designed to offer optimized performance and memory consumption to allow batched reading and writing operations on large entities store

Moreover, abstraction layers for Table and Blob will simplify implementation of your applications and provide simple and fast integration

This will allow you to focus on you application business logic

What the meaning of Entity ?

An entity class is essentially an object wrapper for a database table.

Attributes of an entity are mapped automatically into storage table or metadata of a blob Managing your entities by using various basic and advanced operations such as: read, insert, modify, remove, paginate, bulk read and bulk add/update

With this Library you can map any data entities (C# class) into a table or a blob item

EntityTableClient features

based on Azure.Data.Tables sdk library

  • You can manage any generic C# entities without Azure SDK dependencies: no needs to inehrit from ITableEntity or TableEntity neither
  • You can extend entity properties with dynamic properties (to simplify search and indexing nested objects)
  • You can tag any entity or dynamic properties to be indexed for faster search for tables with large amount of items
  • Handle more primitive types that are not supported by default in azure table storage
  • Lightweight and extensible query expression builder, used to build advanced filter expressions and indexed tags
  • Observe entity changes, subscribe and apply any side effects like CQRS patterns
  • It Could be injected and configured with Microsoft Azure extensions: AzureClientFactoryBuilder

How it works?

EntityTableClient bind any classes (C# entities) to Entity table storage (IEntityTableClient)

This binding allows to have more control when entity was stored of readed from the table storage

Internally, it use Azure storage ETG feature (entity transaction group) to keep indexed tag synchronized with the main entity.

EntityTableClient configuration example

            //==============Entity options and configuratin section====================================================
            //set here for your technical stuff: table name, connection, parallelization
            var entityClient = EntityTableClient.Create<PersonEntity>(
             options =>
            {
                options.ConnectionString = TestEnvironment.ConnectionString;
                options.TableName = $"{nameof(PersonEntity)}";
                options.CreateTableIfNotExists = true;
            }

            //set here your entity behavior dynamic fields, tags, observers
            , config =>
            {
                config
                .SetPartitionKey(p => p.TenantId)
                .SetPrimaryKeyProp(p => p.PersonId)
                .IgnoreProp(p => p.OtherAddress)

                //add tag to generate indexed and sorted entities through rowKey
                .AddTag(p => p.Created)
                .AddTag(p => p.LastName)
                .AddTag(p => p.Distance)
                .AddTag(p => p.Enabled)

                //add computed props to store and compute dynamically additional fields of the entity
                .AddComputedProp("_IsInFrance", p => p.Address?.State == "France")
                .AddComputedProp("_MoreThanOneAddress", p => p.OtherAddress?.Count > 1)
                .AddComputedProp("_CreatedNext6Month", p => p.Created > DateTimeOffset.UtcNow.AddMonths(-6))
                .AddComputedProp("_FirstLastName3Chars", p => p.LastName?.ToLower()[..3])

                //computed props could also be tagged 
                .AddTag("_FirstLastName3Chars")

                //add an entity oberver to track entity changes and apply any action (projection, logging, etc.)
                .AddObserver("EntityLoggerObserver", new EntityLoggerObserver<PersonEntity>());
            });
            //===============================================================================================

Sample projects

Sample projects

Performance tests Sample console based on a table with 1.5 million of entities and 5 partitions (standard storageV2)

image

EntityBlobClient package features

Based on Azure.Data.Blobs sdk library

  • Like EntityTableClient, you can manage any generic C# entities without Azure SDK dependencies
  • Entities properties was mapped and stored directly into Blob metadata, no need to maintain a relation with blob and any additional tables
  • You can tag any entity or dynamic properties to be indexed natively by Azure Blob Storage service
  • It use also same query expression builder of EntityTableClient to query Blobs inside a container
  • It could be injected and configured with Microsoft Azure extensions: AzureClientFactoryBuilder
  • Abstract and simplify Blob reference path by using dynamic path delegate based on your entity properties (SetBlobPath and SetBlobName)

EntityTableClient configuration example

     var options = new EntityBlobClientOptions($"{nameof(DocumentEntity)}Container".ToLower());

            //Configure entity binding in the table storage
            var client = EntityBlobClient.Create<DocumentEntity>(TestEnvironment.ConnectionString)
                .Configure(options, config =>
             config
                .SetBlobContentProp(p => p.Content)
                .SetBlobPath(p => $"{p.Created:yyyy/MM/dd}")
                .SetBlobName(p => $"{p.Name}-{p.Reference}.{p.Extension}")
                .AddTag(p => p.Reference)
                .AddTag(p => p.Name));

Upcoming:

  • Expand test coverage
  • Add more validation rules according to azure storage limitations
  • Gradually improvement of EntityBlobClient
  • More description of the internal implementation of this library
  • Entity migration services, usefull for data or structural migration
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on AzureEntityServices.Queries:

Package Downloads
AzureEntityServices.Tables

Entity Table services for Azure storage

AzureEntityServices.Blobs

Entity Blob services for Azure storage

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.3 387 4/17/2024
1.1.2 1,443 11/21/2023
1.1.2-preview.0.3 117 11/20/2023
1.1.2-preview.0.1 62 9/21/2023
1.1.1 727 7/31/2023
1.1.1-preview.0.13 89 7/28/2023
1.1.1-preview.0.12 96 7/26/2023
1.1.0 410 7/19/2023
1.0.52-preview.0.1 141 5/26/2023
1.0.51 1,616 5/22/2023
1.0.6-preview.0.1 80 5/22/2023
1.0.5 479 5/2/2023
1.0.5-preview.0.2 147 4/20/2023
1.0.5-preview.0.1 89 4/19/2023
1.0.4 898 4/13/2023
1.0.4-preview.0.3 83 4/13/2023
1.0.4-preview.0.2 86 4/6/2023
1.0.4-preview.0.1 90 3/29/2023
1.0.3 2,053 3/28/2023
1.0.3-preview.0.3 250 3/16/2023
1.0.2 5,021 2/20/2023
1.0.2-preview.0.4 154 2/10/2023
1.0.2-preview.0.2 104 2/9/2023
1.0.2-preview.0.1 100 2/9/2023
1.0.1 942 2/8/2023
1.0.1-preview.0.13 110 2/7/2023
1.0.1-preview.0.12 106 2/6/2023
1.0.1-preview.0.11 108 2/6/2023
1.0.1-preview.0.9 107 2/2/2023
1.0.1-preview.0.7 116 2/2/2023
1.0.1-preview.0.6 117 2/2/2023
1.0.1-preview.0.4 108 2/2/2023
1.0.1-preview.0.3 133 1/21/2023
1.0.0 647 1/4/2023
1.0.0-preview.0.56 117 1/4/2023
1.0.0-preview.0.55 890 10/2/2022
1.0.0-preview.0.54 222 9/25/2022
1.0.0-preview.0.53 155 9/22/2022
1.0.0-preview.0.52 244 9/20/2022
1.0.0-preview.0.51 192 9/16/2022
1.0.0-preview.0.50 230 7/29/2022
1.0.0-preview.0.49 146 7/24/2022
1.0.0-preview.0.48 190 6/29/2022
1.0.0-preview.0.47 249 6/17/2022
1.0.0-preview.0.46 160 6/12/2022
1.0.0-preview.0.44 123 6/10/2022
1.0.0-preview.0.43 125 6/10/2022
1.0.0-preview.0.39 227 5/25/2022
1.0.0-preview.0.38 163 5/23/2022
1.0.0-preview.0.37 126 5/20/2022
1.0.0-preview.0.35 127 5/7/2022
1.0.0-preview.0.34 118 5/7/2022
1.0.0-preview.0.33 112 5/6/2022
1.0.0-preview.0.32 119 5/4/2022
1.0.0-preview.0.31 252 4/19/2022
1.0.0-preview.0.30 132 3/2/2022
1.0.0-preview.0.29 175 2/24/2022
1.0.0-preview.0.24 124 2/17/2022
1.0.0-preview.0.22 117 2/17/2022
1.0.0-preview.0.21 127 2/17/2022
1.0.0-preview.0.19 128 2/12/2022
1.0.0-preview.0.18 126 2/9/2022
1.0.0-preview.0.17 139 2/4/2022
1.0.0-preview.0.14 132 2/4/2022
1.0.0-preview.0.13 133 2/4/2022
1.0.0-preview.0.12 136 2/4/2022
1.0.0-preview.0.5 89 7/19/2023
1.0.0-preview.0.4 80 6/6/2023
1.0.0-preview.0.3 82 6/6/2023