TableStorageEntities 2.0.3
dotnet add package TableStorageEntities --version 2.0.3
NuGet\Install-Package TableStorageEntities -Version 2.0.3
<PackageReference Include="TableStorageEntities" Version="2.0.3" />
paket add TableStorageEntities --version 2.0.3
#r "nuget: TableStorageEntities, 2.0.3"
// Install TableStorageEntities as a Cake Addin #addin nuget:?package=TableStorageEntities&version=2.0.3 // Install TableStorageEntities as a Cake Tool #tool nuget:?package=TableStorageEntities&version=2.0.3
TableStorageEntities
Changes from the base library:
- BREAKING CHANGE Uses System.Text.Json instead of Newtonsoft.Json: My initial requirement was to store FIDO2 objects in Azure Table Storage. FIDO2 serializers are hardcoded as System.Text.Json, and base library was using Newtonsoft.Json.
- Comes with built in
TableRepository<T>()
, more information below. - Dependency to Humanizer and OneOf packages.
- Also comes with
TableRepositoryExtensions
for injections withservices.AddTableStorage()
. TableRepository<T>()
has no tests yet, use it at your own risk.- Passes all tests from the base library.
Adding TableRepository<T>
to container
Simplest usage:
services.AddTableStorage("<yourAzureStorageConnectionString>", typeof(Program).Assembly);
This will scan the assembly and find all usages of TableRepository<T>
, register them to your container as scoped objects.
You can also pass JsonSerializerOptions
, this will be set as EntityConvert.SetDefaultJsonSerializerOptions(options);
, so all your conversions use the same options by default. This is particularly useful for converters.
var options = new JsonSerializerOptions
{
IgnoreNullValues = true,
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
};
options.Converters.Add(new JsonStringEnumConverter());
services.AddTableStorage("<yourAzureStorageConnectionString>", typeof(Program).Assembly, options);
Injecting TableRepository<T>
to your class
Once you register, you can inject TableRepository<T>
as if you are injecting any other service:
public class MyService
{
private readonly TableRepository<MyEntity> _tableRepository;
public MyService(TableRepository<MyEntity> tableRepository)
{
_tableRepository = tableRepository;
}
}
Using TableRepository<T>
TODO
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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. 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.0
- Azure.Data.Tables (>= 12.8.2)
- Humanizer.Core (>= 2.14.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- OneOf (>= 3.0.263)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.3 | 393 | 12/1/2023 |
Updated packages