efcore-patterns

Provide Entity Framework Core patterns for entity design, queries, migrations, and testing.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance and code examples for implementing advanced patterns and best practices in Entity Framework Core, enabling developers to build robust, efficient, and maintainable data access layers.

Core Features & Use Cases

  • Entity Design & Configuration: Demonstrates Fluent API for detailed entity mapping and value conversions.
  • Query Optimization: Covers eager loading, projections, split queries, and AsNoTracking() for performance.
  • Advanced Features: Includes transactions, migrations, auditing, pagination, concurrency control, and indexing strategies.
  • Use Case: When designing a new feature that requires complex data relationships and high-performance querying, consult this Skill for optimal EF Core implementation strategies.

Quick Start

Use the efcore-patterns skill to configure a User entity with a unique email index and default creation timestamp.

Frequently Asked Questions about efcore-patterns

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

FAQPage Schema
How do I prevent the N+1 query problem in Entity Framework Core?

Prevent the EF Core N+1 query problem by applying eager loading, projections, or split queries to fetch related entities efficiently. AsNoTracking further optimizes read-only query performance.

What's the best way to configure entity relationships and mappings in EF Core?

Configure EF Core entity relationships and mappings using the Fluent API for precise control over indexes, value conversions, and default timestamps. This approach ensures robust data access layer maintenance.

How does concurrency control work with the Timestamp attribute in EF Core?

EF Core concurrency control uses the Timestamp attribute to manage concurrent updates and prevent data overwrites. It integrates with SaveChangesInterceptor to handle auditing and track entity modifications safely.

What are the trade-offs between EF InMemory, SQLite in-memory, and Testcontainers for testing?

Testing data access trade-offs involve EF InMemory for rapid setup, SQLite in-memory for closer relational behavior, and Testcontainers for full database parity. Select based on your integration fidelity requirements.

When should I use keyset pagination instead of offset-based pagination in EF Core?

Use keyset pagination instead of offset-based pagination in EF Core for large datasets where deep paging causes performance degradation. Keyset pagination leverages indexing strategies for consistent, rapid data retrieval.