map-objects-and-dtos
Installation
SKILL.md
Object-to-Object Mapping in ABP
ABP abstracts object mapping behind IObjectMapper (in the Volo.Abp.ObjectMapping package) and provides integrations for AutoMapper and Mapperly. Application code depends only on the abstraction; you pick the provider per module.
When to Use
- Mapping an entity to a DTO (or any object-to-object) via
IObjectMapper. - Defining AutoMapper profiles or Mapperly mappers and registering them.
- Mapping extra properties between extensible objects.
- Mapping collections of a mapped type.
- Writing a custom typed mapper or pinning a module to its own mapping library.
When Not to Use
- Designing the application service that performs the mapping — use application-services; the standard CrudAppService workflow (its default mapping paths,
MapToEntityAsyncoverrides) — use build-crud-application-services. This skill is only the mapping mechanics. - Adding extra properties to a pre-built module's entities/DTOs — use customize-application-modules; here
.MapExtraProperties()/[MapExtraProperties]only covers mapping already-defined extra properties.