Files
DigitalData.TaskFlow/src/presentation/DigitalData.TaskFlow.API/Program.cs
TekH ee107d74c4 Add DI setup for modular architecture
Introduced `DependencyInjection.cs` in Application and Infrastructure layers to centralize service registration. Updated project files to include necessary package references (`Microsoft.Extensions.Configuration.Abstractions` and `Microsoft.Extensions.DependencyInjection.Abstractions`) and project dependencies between layers. Integrated service registration in `Program.cs` to enable modular architecture for the API.
2026-10-09 15:24:17 +02:00

32 lines
753 B
C#

using DigitalData.TaskFlow.Application;
using DigitalData.TaskFlow.Infrastructure;
var builder = WebApplication.CreateBuilder(args);
var config = builder.Configuration;
// Add services to the container.
builder.Services.AddApplicationServices(config);
builder.Services.AddInfrastructureServices(config);
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();