← ClaudeAtlas

abp-dddlisted

ABP Framework v10.4 DDD quick reference: Entity, AggregateRoot, repository, domain service, application service, DTO, domain events, specification, UOW. Use when designing the domain layer, entities, aggregates, or repositories in ABP.
burakdmir/abp-skills · ★ 10 · Web & Frontend · score 77
Install: claude install-skill burakdmir/abp-skills
# ABP Framework — Domain Driven Design (DDD) ABP Framework v10.4 DDD quick reference. Entity, Aggregate Root, Repository, Domain/Application Service, DTO. ## Trigger "ABP entity/aggregate root", "ABP repository", "ABP application service", "ABP DTO", "ABP domain service", "ABP unit of work", "ABP DDD". ## Layers `Presentation → Application (Services, DTO, UOW) → Domain (Entity, Aggregate, Domain Service, Repo interface) → Infrastructure (EF Core/MongoDB)`. DDD primarily concerns Domain + Application. ## Entity & Aggregate Root ```csharp public class Order : AggregateRoot<Guid> { public string ReferenceNo { get; private set; } public ICollection<OrderLine> Lines { get; private set; } protected Order() { } // for ORM public Order(Guid id, string referenceNo) : base(id) // id from outside (IGuidGenerator) { ReferenceNo = Check.NotNullOrWhiteSpace(referenceNo, nameof(referenceNo)); Lines = new List<OrderLine>(); } public void AddProduct(Guid productId, int count) // behavior in the entity, private setter { if (count <= 0) throw new BusinessException("Orders:InvalidCount"); Lines.Add(new OrderLine(Id, productId, count)); } } ``` **Rules:** rich model (private setter + method), `GuidGenerator.Create()` not `Guid.NewGuid()`, reference by `Id` (no cross-aggregate navigation), **one** repository per aggregate root (don't open a repo for a child entity). ### Audit base