ef-core

Enforces Entity Framework Core best practices for data access layers.

1|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/afonsoft/VideoChat --skill ef-core-afonsoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ef-core
Source: https://github.com/afonsoft/VideoChat/tree/main/.agents/skills/ef-core
Command: npx skills add https://github.com/afonsoft/VideoChat --skill ef-core-afonsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Entity Framework Core projects often struggle with bloated DbContexts, tangled configurations, and inefficient queries that hamper maintainability and performance.

Core Features & Use Cases

  • Focused Data Context design with cohesive boundaries
  • Separate entity configurations using IEntityTypeConfiguration
  • Performance tips like AsNoTracking, eager loading when necessary, and pagination
  • Safe migrations, seeding, and testing strategies
  • Guidance for secure and testable data access across projects

Quick Start

Refactor your DbContext and entities following these best practices to improve maintainability and performance.

Frequently Asked Questions about ef-core

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

FAQPage Schema
How do I prevent N+1 query issues in EF Core?

To prevent N+1 query issues in EF Core, apply best practices like using AsNoTracking for read-only data and implementing eager loading with Include only when necessary to optimize data access.

What is the best way to organize entity configurations in Entity Framework Core?

The best way to organize Entity Framework Core configurations is using separate IEntityTypeConfiguration classes. This design pattern maintains cohesive DbContext boundaries and improves domain modeling maintainability across your .NET application.

How do I design a focused DbContext for domain modeling in EF Core?

Design a focused DbContext in EF Core by establishing cohesive boundaries aligned with your domain. This approach separates entity configurations via IEntityTypeConfiguration, ensuring robust and maintainable data access layers.

Does EF Core support safe migrations and testable data access strategies?

Yes, EF Core supports safe migrations and testable data access strategies. Applying best practices ensures secure migrations, proper data seeding, and testable querying patterns across your .NET projects.

When should I use AsNoTracking for performance tuning in Entity Framework Core?

Use AsNoTracking in Entity Framework Core for read-only queries where change tracking is unnecessary. This performance tuning technique minimizes overhead and ensures efficient data access across your application.