ISOCodex.Currency.AspNetCore
1.1.1
dotnet add package ISOCodex.Currency.AspNetCore --version 1.1.1
NuGet\Install-Package ISOCodex.Currency.AspNetCore -Version 1.1.1
<PackageReference Include="ISOCodex.Currency.AspNetCore" Version="1.1.1" />
<PackageVersion Include="ISOCodex.Currency.AspNetCore" Version="1.1.1" />
<PackageReference Include="ISOCodex.Currency.AspNetCore" />
paket add ISOCodex.Currency.AspNetCore --version 1.1.1
#r "nuget: ISOCodex.Currency.AspNetCore, 1.1.1"
#:package ISOCodex.Currency.AspNetCore@1.1.1
#addin nuget:?package=ISOCodex.Currency.AspNetCore&version=1.1.1
#tool nuget:?package=ISOCodex.Currency.AspNetCore&version=1.1.1
ISOCodex.Currency.AspNetCore
Public documentation and support
This adapter requires .NET 9 or later and ASP.NET Core. It retains its net9.0 asset, also exercised by a .NET 10 packed-package consumer. It does not support classic .NET Framework or classic ASP.NET.
ASP.NET Core integration helpers for ISOCodex.Currency.
Install
dotnet add package ISOCodex.Currency.AspNetCore --version 1.1.1
This package targets net9.0 and uses the ASP.NET Core shared framework.
Register
using ISOCodex.Currency.AspNetCore;
builder.Services.AddCurrencyAspNetCore();
This registers the default currency registry, IMoneyFormatter, MoneyParser, and MVC model binding for CurrencyCode.
MVC Model Binding
CurrencyCode action parameters and model properties bind from route, query, and form values when MVC model binding is active.
app.MapControllerRoute("default", "{controller=Prices}/{action=Get}/{currency?}");
Invalid or unknown codes add a model-state error instead of throwing.
Minimal APIs
CurrencyCode already exposes TryParse(string?, out CurrencyCode), so Minimal API route and query binding can use the core type directly.
app.MapGet("/currencies/{currency}", (CurrencyCode currency) =>
{
return Results.Ok(currency.Code);
});
For Money, keep primitive request DTOs at the boundary and convert explicitly with Money.TryCreate(...).
Validation Problems
Use the problem-details helpers when invalid money input should become a structured HTTP 400 response.
var result = Money.TryCreate(request.Amount, request.Currency);
return result.Succeeded
? Results.Ok(result.Money)
: Results.ValidationProblem(result.ToValidationProblemDictionary("amount"));
The helpers preserve the stable failure reason in ValidationProblemDetails.Extensions["reason"].
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net9.0
- ISOCodex.Currency (>= 1.1.1)
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 |
|---|---|---|
| 1.1.1 | 48 | 9/19/2026 |
| 1.1.0 | 115 | 9/19/2026 |
| 1.0.2 | 159 | 6/23/2026 |
| 1.0.1 | 133 | 6/23/2026 |
| 1.0.0 | 129 | 6/23/2026 |
| 0.9.0-alpha.15 | 77 | 6/23/2026 |
| 0.9.0-alpha.14 | 68 | 6/23/2026 |
| 0.9.0-alpha.13 | 73 | 6/23/2026 |
| 0.9.0-alpha.12 | 68 | 6/23/2026 |
| 0.9.0-alpha.11 | 76 | 6/23/2026 |
| 0.9.0-alpha.10 | 72 | 6/23/2026 |
| 0.9.0-alpha.9 | 85 | 6/22/2026 |
Updated NuGet project and README links to public documentation and aligned ISOCodex patch dependencies. Existing APIs, targets and MIT licensing are unchanged.