entity-framework

Standardize EF Core with PostgreSQL for DbContext, migrations, and repositories in Sorcha.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/StuartF303/Sorcha --skill entity-framework
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: entity-framework
Source: https://github.com/StuartF303/Sorcha/tree/main/.claude/skills/entity-framework
Command: npx skills add https://github.com/StuartF303/Sorcha --skill entity-framework

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Sorcha projects often require robust data access layers using EF Core with PostgreSQL. This skill provides a clear pattern for configuring DbContext, applying migrations automatically in development, and implementing repository patterns with soft delete and JSONB support to improve data integrity and performance.

Core Features & Use Cases

  • EF Core configuration patterns: DbContext setup, retry policies, and schema management for PostgreSQL.
  • Migration & Repository patterns: Guidance on generating and applying migrations and implementing generic and specialized EF Core repositories.
  • Best practices: Soft delete via query filters, JSONB usage, and optimized queries with bulk updates.

Quick Start

To start using EF Core with PostgreSQL in Sorcha, set up a DbContext, register it in DI, add and apply migrations, and utilize the EFCoreRepository pattern in services.

Frequently Asked Questions about entity-framework

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

FAQPage Schema
How do I set up EF Core with PostgreSQL for data access?

EF Core with PostgreSQL requires configuring a DbContext, registering it in dependency injection, and applying migrations. This Skill provides standardized patterns for DbContext setup, retry policies, and schema management to ensure consistent data access across Sorcha services.

What's the best way to implement soft delete in EF Core?

Soft delete in EF Core uses query filters to exclude deleted records automatically without physical removal. This Skill covers soft-delete semantics and query filter patterns to maintain data integrity while preserving historical records in PostgreSQL.

How do I apply database migrations automatically in development?

Database migrations automate schema changes across environments. This Skill provides guidance on generating migrations, applying them automatically in development, and managing PostgreSQL schema changes consistently within the Sorcha codebase.

Can I use JSONB with EF Core and PostgreSQL?

JSONB is a PostgreSQL native type for storing structured data efficiently. This Skill includes JSONB handling patterns and best practices for leveraging PostgreSQL's JSONB capabilities through EF Core with optimized queries and bulk updates.

What repository pattern should I use with EF Core?

Repository patterns abstract data access logic and improve testability. This Skill enforces typed repositories and provides implementation guidance for generic and specialized EF Core repositories across Sorcha services.

Why use retry policies with EF Core and PostgreSQL?

Retry policies handle transient connection failures gracefully. This Skill specifies retry policy requirements for EF Core with PostgreSQL to improve reliability and resilience in the Sorcha environment.