Files
nexus-backend/Nexus.Api/Program.cs
T

17 lines
386 B
C#

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