20 lines
522 B
C#
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(); |