Přepsání na sqlite

This commit is contained in:
Matěj Kubíček committed 2026-09-17 20:38:45 +02:00
1 parent 7ba60f0e68
commit 556226b09b
9 files changed
+151 -481

No files matched your search

+2 -5
View File
@@ -13,12 +13,9 @@ public class Program
DotEnv.Load();
var builder = WebApplication.CreateBuilder(args);
// gets the connection string from configuration
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection")
?? throw new InvalidOperationException("Connection string 'DefaultConnection' not found.");
builder.Services.AddDbContext<AppDbContext>(options =>
options.UseNpgsql(connectionString));
options.UseSqlite(
builder.Configuration.GetConnectionString("DefaultConnection")));
builder.Services.AddControllersWithViews();