ef-core

Implement Entity Framework Core best practices for data access.

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/angryconsultant/Copilot-CLI --skill ef-core-angryconsultant
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ef-core
Source: https://github.com/angryconsultant/Copilot-CLI/tree/main/skills/ef-core
Command: npx skills add https://github.com/angryconsultant/Copilot-CLI --skill ef-core-angryconsultant

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers to follow proven best practices for Entity Framework Core, helping them design clean data models, maintainable contexts, and efficient queries.

Core Features & Use Cases

  • Data modeling: plan cohesive DbContext, entities, and configurations.
  • Performance & reliability: apply lazy loading, tracking behavior, and batching considerations to avoid N+1 queries and performance pitfalls.
  • Migrations & Testing: create focused migrations, seed data appropriately, and test with in-memory or SQLite providers.

Quick Start

Create a new EF Core project with a focused DbContext and apply the recommended configuration and migrations.

Frequently Asked Questions about ef-core

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

FAQPage Schema
How do I design a cohesive DbContext for Entity Framework Core?

Design a cohesive DbContext for Entity Framework Core by grouping related entities and configurations together. This structured approach ensures maintainable contexts and clean data models across web, desktop, or service applications.

What's the best way to avoid N+1 queries in EF Core?

Avoid N+1 queries in EF Core by applying efficient querying techniques and managing lazy loading behaviors. Properly adjusting tracking behavior and batching considerations prevents common performance pitfalls.

How do I create focused migrations and seed data appropriately in EF Core?

Create focused migrations and seed data in EF Core by following structured guidelines for safe schema changes. This ensures reliable database evolution without compromising existing data integrity.

Can I test EF Core data access using in-memory or SQLite providers?

Test EF Core data access using in-memory or SQLite providers to validate logic safely. This enables testable data access by simulating database operations without requiring a full production database environment.

When do I need explicit entity configuration in Entity Framework Core?

Explicit entity configuration in Entity Framework Core is needed to define precise mapping rules and constraints. Applying this best practice ensures reliable data access and prevents schema mapping ambiguities.