ABP Framework — Entity Framework Core

Configure ABP Framework v10.4 EF Core DbContext, repositories, mappings, and migrations.

13|4|Updated May 27, 2026
One-click install
npx skills add https://github.com/burakdmir/abp-skills --skill abp-framework-entity-framework-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ABP Framework — Entity Framework Core
Source: https://github.com/burakdmir/abp-skills/tree/main/claude/abp-efcore
Command: npx skills add https://github.com/burakdmir/abp-skills --skill abp-framework-entity-framework-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you integrate ABP Framework (v10.4) with Entity Framework Core by showing how to correctly configure DbContext, repositories, mappings, loading strategies, and migrations so your data layer behaves predictably.

Core Features & Use Cases

  • DbContext creation & registration: Create an AbpDbContext-based DbContext and register it with AddAbpDbContext, including default repositories.
  • Entity mapping with Fluent API: Use ConfigureByConvention and extend configuration with table mapping, property constraints, and indexes.
  • Repository loading patterns: Apply eager loading via WithDetailsAsync (and defaults), explicit loading for targeted collections, and lazy loading via proxies and virtual navigation properties.
  • Operational database setup: Choose and configure DBMS providers (SQL Server/PostgreSQL/MySQL/SQLite/Oracle), connection strings, and multi-tenancy behaviors.
  • Migrations & advanced patterns: Run EF Core migrations, seed data, handle multiple DbContext migrations, replace DbContext via interface, and customize bulk operations.

Quick Start

Set up ABP Framework EF Core in your project by adding the Volo.Abp.EntityFrameworkCore package and configuring your AbpDbContext with ConfigureByConvention plus an appropriate provider for your chosen database.

Frequently Asked Questions about ABP Framework — Entity Framework Core

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

FAQPage Schema
How do I register an EF Core DbContext in ABP Framework?

To register an EF Core DbContext in ABP Framework, create a class inheriting from AbpDbContext and use the AddAbpDbContext method in your module to configure default or custom repositories.

What is the correct way to configure entity mappings with EF Core in ABP Framework?

Entity mapping in ABP Framework EF Core requires calling ConfigureByConvention inside your DbContext to apply base mappings, then extending with Fluent API for table mapping, property constraints, and indexes.

How does eager loading work with ABP Framework repositories?

Eager loading in ABP Framework repositories uses WithDetailsAsync to explicitly include navigation properties, while EnsureCollectionLoadedAsync provides explicit loading for targeted collections when needed.

Can I use PostgreSQL or MySQL with ABP Framework EF Core?

Yes, ABP Framework EF Core supports SQL Server, PostgreSQL, MySQL, SQLite, and Oracle providers, requiring correct provider package selection and connection string configuration for your chosen DBMS.

How do I handle multi-tenant connection behavior in ABP EF Core?

Multi-tenant connection behavior in ABP EF Core is managed through proper AbpDbContext configuration, ensuring connection strings and tenant resolution align with your database provider setup.

Why are my EF Core migrations failing with multiple DbContexts in ABP Framework?

EF Core migrations with multiple DbContexts in ABP Framework require careful migration commands targeting specific contexts, proper connection string mapping, and seed data configuration to avoid conflicts.