UA.Tenet.Web extends the Tenet Framework for ASP.NET Core applications. It provides a unified convention-based configuration combining the structure of Controller-based APIs with the performance of Minimal APIs, along with TagHelpers, view components, and web extensions.
$ dotnet add package UA.Tenet.WebUA.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.
Install via NuGet Package Manager:
dotnet add package UA.Tenet.Web
Or via Package Manager Console:
Install-Package UA.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();
@addTagHelper *, UA.Tenet.Web
<!-- Enhanced image tag with lazy loading and responsive images -->
<img src="~/images/product.jpg"
alt="Product Image"
class="product-image" />
using UA.Tenet.Web.Abstractions;
public class HomeController : ViewController
{
public IActionResult Index()
{
return View();
}
public IActionResult About()
{
return View();
}
}
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");
};
};
});
UA.Tenet.Web follows the Tenet Framework principles:
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
app.UseSwagger();
app.UseSwaggerUI();
app.UseTenet();
For comprehensive documentation, tutorials, and API reference, visit:
Made with ❤️ by UA Devs @ Chiclana de la Frontera (Spain)