Len.StronglyTypedId.NewtonsoftJson
1.0.7
dotnet add package Len.StronglyTypedId.NewtonsoftJson --version 1.0.7
NuGet\Install-Package Len.StronglyTypedId.NewtonsoftJson -Version 1.0.7
<PackageReference Include="Len.StronglyTypedId.NewtonsoftJson" Version="1.0.7" />
paket add Len.StronglyTypedId.NewtonsoftJson --version 1.0.7
#r "nuget: Len.StronglyTypedId.NewtonsoftJson, 1.0.7"
// Install Len.StronglyTypedId.NewtonsoftJson as a Cake Addin
#addin nuget:?package=Len.StronglyTypedId.NewtonsoftJson&version=1.0.7
// Install Len.StronglyTypedId.NewtonsoftJson as a Cake Tool
#tool nuget:?package=Len.StronglyTypedId.NewtonsoftJson&version=1.0.7
StronglyTypedId
A base implementation of strongly typed ids.
Getting started
Install the package into your application or library.
Package Manager : Install-Package Len.StronglyTypedId CLI : dotnet add package Len.StronglyTypedId
Use record to define a strongly typed id:
[StronglyTypedId] public partial record struct OrderId(Guid Value);
or
[StronglyTypedId] public partial record OrderId(Guid Value);
Note: Only the record type is supported and cannot be nested, abstract, or generic
Newtonsoft
Install the package into your application or library.
Package Manager : Install-Package Len.StronglyTypedId.AspNetCore.NewtonsoftJson CLI : dotnet add package Len.StronglyTypedId.NewtonsoftJson
Add the converter of the strongly type Id to the configuration.
services.AddControllers().AddNewtonsoftJson(options => { options.SerializerSettings.AddStronglyTypedId(); });
EntityFramework Core
Install the package into your application or library.
Package Manager : Install-Package Len.StronglyTypedId.EntityFrameworkCore CLI : dotnet add package Len.StronglyTypedId.EntityFrameworkCore
Add the converter for a strongly typed id to the configuration of DbContext.
protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) { base.ConfigureConventions(configurationBuilder); //...other configurationBuilder.AddStronglyTypedId(/* assembles */); }
Swashbuckle.AspNetCore
Install the package into your application or library.
Package Manager : Install-Package Len.StronglyTypedId.Swashbuckle.AspNetCore CLI : dotnet add package Len.StronglyTypedId.Swashbuckle.AspNetCore
Add the converter for a strongly typed id to the configuration of DbContext.
services.AddSwaggerGen(options => { options.AddStronglyTypedId(/* assembles */); });
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- Len.StronglyTypedId (>= 1.0.7)
- Newtonsoft.Json (>= 13.0.3)
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 |
---|