UA.Tenet.Web
4.9.3
dotnet add package UA.Tenet.Web --version 4.9.3
NuGet\Install-Package UA.Tenet.Web -Version 4.9.3
<PackageReference Include="UA.Tenet.Web" Version="4.9.3" />
<PackageVersion Include="UA.Tenet.Web" Version="4.9.3" />
<PackageReference Include="UA.Tenet.Web" />
paket add UA.Tenet.Web --version 4.9.3
#r "nuget: UA.Tenet.Web, 4.9.3"
#:package UA.Tenet.Web@4.9.3
#addin nuget:?package=UA.Tenet.Web&version=4.9.3
#tool nuget:?package=UA.Tenet.Web&version=4.9.3
UA.Tenet.Web
UA.Tenet.Web extends the Tenet Framework for ASP.NET Core applications, providing a unified convention-based configuration that combines the structured approach of Controller-based APIs with the simplicity and performance of Minimal APIs.
Features
🚀 Minimal API Extensions
- TenetMinimalAttribute: Convention-based minimal API endpoint registration
- Automatic Route Discovery: Scan and register minimal endpoints automatically
- Endpoint Route Builder Extensions: Simplified endpoint configuration
🎛️ Controllers & Views
- ViewController: Base class for view-focused controllers
- ViewComponentBase: Enhanced view component functionality
- ActionExecutingContext Extensions: Request pipeline utilities
🏷️ Tag Helpers
- TenetImageTagHelper: Enhanced image tag with lazy loading, responsive images, and optimization
- Custom tag helpers for common web scenarios
🔧 Configuration & Middleware
- TenetWebOptions: Centralized web application configuration
- ApplicationBuilder Extensions: Fluent middleware configuration
- ServiceCollection Extensions: Dependency injection setup for web components
📝 Razor Extensions
- RazorPageBase Extensions: Enhanced Razor page functionality
- Helpers for common web development tasks
🌐 HTTP Request Extensions
- Request parsing and validation utilities
- Header and query string manipulation
- Context-aware helpers
Installation
Install via NuGet Package Manager:
dotnet add package UA.Tenet.Web
Or via Package Manager Console:
Install-Package UA.Tenet.Web
Quick Start
Setting Up Tenet Web
using UA.Tenet.Web.Extensions;
var builder = WebApplication.CreateBuilder(args);
// Add Tenet MVC services
builder.Services.AddTenetMvc();
var app = builder.Build();
// Configure Tenet middleware
app.UseTenet(options =>
{
options.UseHttpsRedirection = true;
options.UseStaticFiles = true;
options.UseRouting = true;
});
app.Run();
Using Tag Helpers
@addTagHelper *, UA.Tenet.Web
<img src="~/images/product.jpg"
alt="Product Image"
class="product-image" />
Creating View Controllers
using UA.Tenet.Web.Abstractions;
public class HomeController : ViewController
{
public IActionResult Index()
{
return View();
}
public IActionResult About()
{
return View();
}
}
Configuring Web Options
app.UseTenet(options =>
{
options.UseHttpsRedirection = true;
options.UseStaticFiles = true;
options.UseRouting = true;
options.UseAuthentication = true;
options.UseAuthorization = true;
options.StaticFileOptions = builder =>
{
builder.RequestPath = "/static";
builder.OnPrepareResponse = ctx =>
{
ctx.Context.Response.Headers.Append("Cache-Control", "public,max-age=31536000");
};
};
});
Architecture
UA.Tenet.Web follows the Tenet Framework principles:
- Convention over Configuration: Automatic endpoint discovery and registration
- Performance: Leverages Minimal API performance benefits
- Structure: Maintains organized Controller-like structure
- Flexibility: Mix and match traditional controllers with minimal APIs
- Testability: Clean separation of concerns for easy testing
Integration with Swagger
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
app.UseSwagger();
app.UseSwaggerUI();
app.UseTenet();
Documentation
For comprehensive documentation, tutorials, and API reference, visit:
Made with ❤️ by UA Devs @ Chiclana de la Frontera (Spain)
| 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
- Swashbuckle.AspNetCore (>= 8.1.4)
- UA.Tenet (>= 4.9.3)
-
net8.0
- Swashbuckle.AspNetCore (>= 8.1.4)
- UA.Tenet (>= 4.9.3)
-
net9.0
- Swashbuckle.AspNetCore (>= 8.1.4)
- UA.Tenet (>= 4.9.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
See https://tenet.uadevs.org/ for release notes and documentation.