AspNetConventions 1.0.0
See the version list below for details.
dotnet add package AspNetConventions --version 1.0.0
NuGet\Install-Package AspNetConventions -Version 1.0.0
<PackageReference Include="AspNetConventions" Version="1.0.0" />
<PackageVersion Include="AspNetConventions" Version="1.0.0" />
<PackageReference Include="AspNetConventions" />
paket add AspNetConventions --version 1.0.0
#r "nuget: AspNetConventions, 1.0.0"
#:package AspNetConventions@1.0.0
#addin nuget:?package=AspNetConventions&version=1.0.0
#tool nuget:?package=AspNetConventions&version=1.0.0
AspNetConventions
<p align="center"> <img src="https://raw.githubusercontent.com/keizrivas/AspNetConventions/main/assets/asp_net_conventions.svg" width="250"> </p>
Convention-driven standardization for ASP.NET Core - Automatically applies consistent standardization across ASP.NET Core applications — including APIs, MVC, and Razor Pages — with minimal configuration and zero boilerplate.
<p align="center"> <img src="https://raw.githubusercontent.com/keizrivas/AspNetConventions/main/assets/banner.png" width="100%"> </p>
Why AspNetConventions?
We believe API building should be intuitive. AspNetConventions transforms standard ASP.NET setups into a modern API solution by applying smart global behaviors automatically:
- Universal Endpoint Support - Consistent URL structure across MVC, Minimal APIs, and Razor Pages.
- Automatic Route standardization - Route and parameter names are transformed and bound automatically follow your preferred casing style.
- Standardized responses - Uniform JSON formatting and consistent response formatting application-wide.
- Global exception handling - Centralized error handling and formatting throughout your codebase.
- Fully Extensible - Supports custom converters, mappers, hooks, and response formatters, as well as third-party library compatibility.
- Zero Runtime Overhead - Conventions are applied during application startup, no performance impact on requests.
Quick Start
Installation
dotnet add package AspNetConventions
Basic Configuration
// Program.cs
var builder = WebApplication.CreateBuilder(args);
// Apply conventions to MVC Controllers/Razor Pages
builder.Services
.AddControllersWithViews()
.AddAspNetConventions();
var app = builder.Build();
// Apply conventions to Minimal APIs
var api = app.UseAspNetConventions("/");
api.MapGet("/GetUser/{UserId}", (int UserId) => new { userId = UserId });
app.Run();
That's it! Your entire application now follows consistent conventions.
Contributing
Contributions, issues, and feature requests are welcome!
If you believe a convention should be improved or added, feel free to open a discussion.
License
This project is licensed under the MIT License. See LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. 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 is compatible. 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. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.