Files
nexus-backend/Nexus.Api/Program.cs
T
2026-07-04 23:36:31 +02:00

20 lines
522 B
C#

using Microsoft.EntityFrameworkCore;
using Nexus.Application.Interfaces;
using Nexus.Infrastructure.Persistence;
using Nexus.Infrastructure.Services;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContext<NexusDbContext>(options =>
options.UseNpgsql(
builder.Configuration.GetConnectionString("DefaultConnection")
)
);
builder.Services.AddScoped<IProjectService, ProjectService>();
builder.Services.AddControllers();
var app = builder.Build();
app.MapControllers();
app.Run();