Euhen.AppBuilder
2.1.0
dotnet add package Euhen.AppBuilder --version 2.1.0
NuGet\Install-Package Euhen.AppBuilder -Version 2.1.0
<PackageReference Include="Euhen.AppBuilder" Version="2.1.0" />
<PackageVersion Include="Euhen.AppBuilder" Version="2.1.0" />
<PackageReference Include="Euhen.AppBuilder" />
paket add Euhen.AppBuilder --version 2.1.0
#r "nuget: Euhen.AppBuilder, 2.1.0"
#:package Euhen.AppBuilder@2.1.0
#addin nuget:?package=Euhen.AppBuilder&version=2.1.0
#tool nuget:?package=Euhen.AppBuilder&version=2.1.0
Euhen.AppBuilder
Core package for building modular .NET applications. Provides a structured way to organise service registrations into self-contained modules, keeping your Program.cs clean and your application logic well-separated.
Installation
dotnet add package Euhen.AppBuilder
How it works
EuhenAppBuilder acts as a thin orchestration layer on top of IHostApplicationBuilder. You register service modules that encapsulate DI configuration. Each module is applied immediately upon registration.
Getting started
Step 1 — Create a service module
Implement IServiceModule to encapsulate the service registration for a feature or concern.
using Euhen.AppBuilder.Modules;
public class DatabaseModule : IServiceModule
{
public void Configure(IHostApplicationBuilder builder)
{
builder.Services.AddDbContext<AppDbContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("Default")));
}
}
Step 2 — Register the module in Program.cs
var builder = Host.CreateApplicationBuilder(args);
new EuhenAppBuilder(builder)
.AddServiceModule(new DatabaseModule());
var app = builder.Build();
app.Run();
When custom configuration is needed outside of a module, use ConfigureServices to apply inline configuration directly:
new EuhenAppBuilder(builder)
.AddServiceModule(new DatabaseModule())
.ConfigureServices(b => b.Services.AddSingleton<IMyService, MyService>());
Terminology
| Term | Description |
|---|---|
EuhenAppBuilder |
Wraps IHostApplicationBuilder and coordinates service module registration. |
IServiceModule |
Contract for a module that registers services into the DI container. Configure is called immediately when the module is added. |
AddServiceModule |
Registers and immediately applies an IServiceModule. |
ConfigureServices |
Applies inline service configuration without needing a dedicated module class. |
License
This project is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Euhen.AppBuilder:
| Package | Downloads |
|---|---|
|
Euhen.AppBuilder.Web
ASP.NET Core extensions for building modulair web applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.