Kurse:Asp Net Core Übung 1: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Die Seite wurde neu angelegt: „ Program.cs <pre> builder.Services.AddDbContext<ApplicationDbContext>(options => options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultContext")));// using Microsoft.EntityFrameworkCore; </pre>“ |
Keine Bearbeitungszusammenfassung |
||
| Zeile 2: | Zeile 2: | ||
Program.cs | Program.cs | ||
<pre> | <pre> | ||
builder.Services.AddDbContext<ApplicationDbContext>(options => options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultContext")));/ | builder.Services.AddDbContext<ApplicationDbContext>(options => options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultContext"))); | ||
</pre> | |||
appsettings.json | |||
<pre> | |||
"ConnectionStrings": {"DefaultContext" : "Host=localhost;Port=5432;Database=thorsten;Username=thorsten;Password=Test" | |||
</pre> | </pre> | ||
Version vom 17. Juli 2025, 01:24 Uhr
Program.cs
builder.Services.AddDbContext<ApplicationDbContext>(options => options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultContext")));
appsettings.json
"ConnectionStrings": {"DefaultContext" : "Host=localhost;Port=5432;Database=thorsten;Username=thorsten;Password=Test"