softinter-chiangrai/up-ai-skill-training

d1-04-db-config

Configures the up-api .NET project's PostgreSQL connection (Npgsql, EF Core DbContext). No redeploy — config/code only. Use when the user asks for Day 1 step 4 of the CRUD drill, or asks to connect up-api to the database.

First seen Aug 7, 2026

Installation

$ npx skills add softinter-chiangrai/up-ai-skill-training --skill d1-04-db-config

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from softinter-chiangrai/up-ai-skill-training · top by installs.

npx skills add softinter-chiangrai/up-ai-skill-training

Browse all from softinter-chiangrai/up-ai-skill-training

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

CompatibilityRequires the .NET 10 SDK, and an existing up-api project + running Postgres db (from earlier drill steps).

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,482 B
  • docs SUMMARY.md 246 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 47 installs

SKILL.md

Day 1 · Step 4 — Configure the DB connection (no redeploy)

```Run bash cd up-api dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL dotnet add package Microsoft.EntityFrameworkCore.Design


`appsettings.Development.json`:

{ "ConnectionStrings": { "Default": "Host=localhost;Port=5432;Database=up_db;Username=upadmin;Password=uppass" } }

Use `localhost` here because EF CLI commands (next steps) run from the host. Inside the `up-api`
container the connection string instead uses the compose service name `db` — that's already set in the
container's environment from the docker-deploy step, don't change it.

`Data/AppDbContext.cs`:

public class AppDbContext : DbContext { public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { } // DbSet<Entity> properties are added in the entity-migration step }


`Program.cs`:

builder.Services.AddDbContext<AppDbContext>(opt => opt.UseNpgsql(builder.Configuration.GetConnectionString("Default")));


This step is code + config only — do not redeploy.