From a27d8d5397cb759a285d8eada03982e18596518f Mon Sep 17 00:00:00 2001 From: Gwendolyn Date: Sat, 19 Nov 2022 22:46:32 +0100 Subject: [PATCH] systemd integration --- Program.cs | 3 ++- labdb.csproj | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index bf2ee74..55675a2 100644 --- a/Program.cs +++ b/Program.cs @@ -9,7 +9,8 @@ public static class Program { var builder = WebApplication.CreateBuilder(args); - // Add services to the container. + builder.Host.UseSystemd(); + var connectionString = builder.Configuration.GetConnectionString("DefaultConnection") ?? throw new InvalidOperationException("Connection string 'DefaultConnection' not found."); builder.Services.AddDbContextFactory(options => options diff --git a/labdb.csproj b/labdb.csproj index bf8d9d4..2c18218 100644 --- a/labdb.csproj +++ b/labdb.csproj @@ -14,6 +14,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive +