abp-application-layer

Guides creation and review of ABP application services, DTOs, validation, and object mapping.

Updated Jul 21, 2026
One-click install
npx skills add https://github.com/afonsoft/gamehub --skill abp-application-layer-afonsoft
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: abp-application-layer
Source: https://github.com/afonsoft/gamehub/tree/main/.claude/skills/abp-application-layer
Command: npx skills add https://github.com/afonsoft/gamehub --skill abp-application-layer-afonsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers working in ABP-based .NET solutions often misplace business logic, misuse DTOs, or pick the wrong object-mapping approach when building the Application layer. This Skill provides the conventions and code patterns needed to write application services, DTOs, validation, and error handling that follow ABP best practices. ## Core Features & Use Cases - Application Service Patterns: Enforces correct structure for app services, including DTO-only contracts, separate ID parameters, permission attributes, and avoidance of cross-service calls within a module. - DTO Conventions & Validation: Standardizes DTO naming (Create/Update/ListItem), placement in Application.Contracts, and validation via Data Annotations, IValidatableObject, or FluentValidation. - Error Handling & Mapping: Covers BusinessException, EntityNotFoundException, HTTP status mapping, and object mapping with Mapperly or AutoMapper. - Use Case: When adding a new CRUD feature to an ABP module, use this Skill to scaffold the app service interface, DTOs, validation rules, and Mapperly mapper following framework conventions. ## Quick Start Ask the AI to create an ABP application service with DTOs, validation, and Mapperly mapping for a given entity following these patterns.

Frequently Asked Questions about abp-application-layer

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

FAQPage Schema
How do I create an ABP application service with CRUD methods?▼

Define an interface inheriting IApplicationService in Application.Contracts with methods like GetAsync, CreateAsync, UpdateAsync, and DeleteAsync. Implement it in the Application project using repositories and domain services, accepting and returning only DTOs.

Mapperly vs AutoMapper in ABP: which should I use?▼

Mapperly is the default mapping library in ABP and generates mapping code at compile time for better performance. Check which provider your solution already uses; in mixed solutions you may need to explicitly set the default provider per the AutoMapper-to-Mapperly migration guide.

Where should DTOs be defined in an ABP solution?▼

DTOs belong in the Application.Contracts project so they can be shared with clients such as Blazor or HttpApi.Client. Follow naming conventions like CreateBookDto, UpdateBookDto, and BookListItemDto.

Should I use IFormFile in an ABP application service?▼

No. Application services should not accept IFormFile or Stream parameters. Accept byte[] instead and let controllers handle the file upload conversion before calling the app service.

When should I use IValidatableObject for DTO validation?▼

Use IValidatableObject only for application-level validation that Data Annotations cannot express, such as cross-property checks. Domain rules belong in entity constructors or domain services, not in DTO validation.

Why does my ABP app service not appear as an auto API controller?▼

Auto API controllers require the interface to inherit IApplicationService, which carries the RemoteService attribute. Check that no [RemoteService(false)] attribute disables generation and that method names use recognized prefixes like Get, Create, Update, or Delete.