abp-service-patterns

Generate ABP Framework application service patterns with DTOs and Mapperly mapping.

24|5|Updated Nov 28, 2025
One-click install
npx skills add https://github.com/thapaliyabikendra/ai-artifacts --skill abp-service-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: abp-service-patterns
Source: https://github.com/thapaliyabikendra/ai-artifacts/tree/main/.claude/skills/abp-service-patterns
Command: npx skills add https://github.com/thapaliyabikendra/ai-artifacts --skill abp-service-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides essential ABP Framework application service patterns, solving the challenge of building consistent, secure, and efficient API endpoints. It guides you in structuring your application services for CRUD operations, DTO mapping, and business logic orchestration, aligning with ABP's modular architecture.

Core Features & Use Cases

  • CRUD Application Services: Templates for implementing standard Create, Read, Update, and Delete operations, ensuring consistency across your APIs.
  • DTO Mapping: Demonstrates how to use AutoMapper or similar tools for efficient and clean mapping between entities and Data Transfer Objects.
  • Authorization & Validation: Guides on integrating ABP's authorization system and FluentValidation for robust access control and input validation within services.
  • Domain Logic Orchestration: Explains how application services orchestrate domain logic, delegating complex business rules to domain entities or domain services.
  • Use Case: A developer needs to create a new application service for managing 'Customers'. Using this skill, they quickly scaffold the CustomerAppService, implementing all CRUD operations with appropriate DTOs, authorization, and validation.

Quick Start

Implement an ABP application service method GetCustomerAsync that retrieves a customer by ID and maps it to a CustomerDto, including basic authorization.

Frequently Asked Questions about abp-service-patterns

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

FAQPage Schema
How do I structure CRUD application services in ABP Framework?

ABP application services implement Create, Read, Update, and Delete operations through AppService classes that handle business logic orchestration, DTO mapping, and authorization. Use repository-based data access with Unit of Work for consistent transaction handling and wrap responses in PagedResultDto for list operations.

How do I map DTOs to entities using Mapperly in ABP?

Mapperly integrates with ABP application services to automatically map between domain entities and Data Transfer Objects. Configure Mapperly mappers in your AppService to transform entity data bidirectionally, reducing boilerplate while maintaining type safety across your API layer.

Can I implement authorization and validation in ABP application services?

ABP application services support built-in authorization attributes and integrate with FluentValidation for input validation. Combine ABP's authorization system with validation policies to enforce access control and business rules before processing requests in your services.

What's the best way to implement list filtering with pagination in ABP?

Use Filter DTOs with WhereIf-based filtering logic in ABP application services to build dynamic queries. Combine with PagedResultDto to return paginated results, allowing clients to filter, sort, and paginate efficiently through repository-based data access.

Does ABP Framework 10.x support automatic Unit of Work handling in services?

Yes, ABP Framework 10.x provides automatic Unit of Work management in application services, eliminating manual transaction control. This ensures consistent database state across CRUD operations without explicit SaveChanges calls in your AppService methods.

Why should I use ResponseModel wrapping for ABP API endpoints?

ResponseModel wrapping standardizes API responses across your ABP application, providing consistent error handling, status codes, and data formatting. This pattern simplifies client integration and improves API maintainability by centralizing response structure logic.