menlo-persistence

Automate PostgreSQL persistence setup with EF Core for Menlo applications.

Updated Oct 22, 2024
One-click install
npx skills add https://github.com/DigiBanks99/dotfiles --skill menlo-persistence
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: menlo-persistence
Source: https://github.com/DigiBanks99/dotfiles/tree/main/modules/agents/.config/.agents/skills/menlo-persistence
Command: npx skills add https://github.com/DigiBanks99/dotfiles --skill menlo-persistence

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates and standardizes the persistence layer across Menlo's bounded contexts, reducing boilerplate and ensuring consistent audit/soft-delete behavior.

Core Features & Use Cases

  • Centralized EF Core persistence for Menlo with a single MenloDbContext implementing all slice interfaces.
  • Soft delete and auditing via interceptors and global query filters.
  • Migration and DI registration patterns; supports per-context interfaces and typed IDs.

Quick Start

Run the standard setup to initialize the persistence layer and apply migrations against PostgreSQL.

Frequently Asked Questions about menlo-persistence

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure EF Core soft delete and auditing with PostgreSQL?

EF Core soft delete and auditing with PostgreSQL is configured using global query filters and database interceptors. This approach automatically tracks modifications and hides deleted records across all bounded contexts without requiring manual query logic.

What is the best way to manage EF Core migrations across multiple bounded contexts?

Managing EF Core migrations across bounded contexts requires a central MenloDbContext and per-context interfaces. You execute migration commands using exact --project and --startup-project flags to ensure database schema updates apply correctly to the targeted context.

Does this Menlo persistence setup support typed IDs in EF Core?

Typed IDs are fully supported in this EF Core persistence setup. Entity type configurations map typed identifiers directly within the PostgreSQL database schema, ensuring strong typing across domain entities and preventing primitive type mix-ups.

How do I register persistence slice interfaces for dependency injection in EF Core?

Persistence slice interfaces are registered for dependency injection by configuring the central MenloDbContext. This automated DI registration binds per-context interfaces to the EF Core pipeline, reducing boilerplate and standardizing data access layer wiring.

Why do my EF Core migrations fail when using a shared DbContext across bounded contexts?

EF Core migrations fail when command arguments are incorrect. Applying migrations against PostgreSQL requires specifying the exact --project and --startup-project flags in your migration commands to correctly target the central MenloDbContext configuration.