ISOCodex.Currency.AspNetCore
1.0.2
dotnet add package ISOCodex.Currency.AspNetCore --version 1.0.2
NuGet\Install-Package ISOCodex.Currency.AspNetCore -Version 1.0.2
<PackageReference Include="ISOCodex.Currency.AspNetCore" Version="1.0.2" />
<PackageVersion Include="ISOCodex.Currency.AspNetCore" Version="1.0.2" />
<PackageReference Include="ISOCodex.Currency.AspNetCore" />
paket add ISOCodex.Currency.AspNetCore --version 1.0.2
#r "nuget: ISOCodex.Currency.AspNetCore, 1.0.2"
#:package ISOCodex.Currency.AspNetCore@1.0.2
#addin nuget:?package=ISOCodex.Currency.AspNetCore&version=1.0.2
#tool nuget:?package=ISOCodex.Currency.AspNetCore&version=1.0.2
ISOCodex.Currency.AspNetCore
ASP.NET Core integration helpers for ISOCodex.Currency.
Install
dotnet add package ISOCodex.Currency.AspNetCore --version 1.0.2
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.0.2)
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.0.2 | 124 | 6/23/2026 |
| 1.0.1 | 114 | 6/23/2026 |
| 1.0.0 | 114 | 6/23/2026 |
| 0.9.0-alpha.15 | 60 | 6/23/2026 |
| 0.9.0-alpha.14 | 50 | 6/23/2026 |
| 0.9.0-alpha.13 | 60 | 6/23/2026 |
| 0.9.0-alpha.12 | 53 | 6/23/2026 |
| 0.9.0-alpha.11 | 63 | 6/23/2026 |
| 0.9.0-alpha.10 | 59 | 6/23/2026 |
| 0.9.0-alpha.9 | 59 | 6/22/2026 |