blob: 5945bcf621b9687d33925975ba817faeca90b10b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
using ConfigTest;
using Microsoft.EntityFrameworkCore;
using Spacebar.Db.Contexts;
var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddHostedService<Worker>();
builder.Services.AddDbContext<SpacebarDbContext>(options => {
options
.UseNpgsql(builder.Configuration.GetConnectionString("Spacebar"))
.EnableDetailedErrors();
}, ServiceLifetime.Singleton);
var host = builder.Build();
host.Run();
|