Skip to main content

abp-app-nolayers

ABP Single-Layer (No-Layers / nolayers) application template - single project structure, feature-based file organization, no separate Domain/Application.Contracts projects. Use when working with the single-layer web application template or when the project has no layered separation.

설치로 이동

소스 정보

저장소
abpframework/abp
최근 소스 활동
2026년 3월 22일 17:13
감지된 SKILL.md 언어
영어
스타
14,434
포크
3,718

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
abp-app-nolayers
description
ABP Single-Layer (No-Layers / nolayers) application template - single project structure, feature-based file organization, no separate Domain/Application.Contracts projects. Use when working with the single-layer web application template or when the project has no layered separation.
# ABP Single-Layer Application Template > **Docs**: https://abp.io/docs/latest/solution-templates/single-layer-web-application ## Solution Structure Single project containing everything: ``` MyProject/ ├── src/ │ └── MyProject/ │ ├── Data/ # DbContext, migrations │ ├── Entities/ # Domain entities │ ├── Services/ # Application services + DTOs │ ├── Pages/ # Razor pages / Blazor components │ └── MyProjectModule.cs └── test/ └── MyProject.Tests/ ``` ## Key Differences from Layered | Layered Template | Single-Layer Template | |------------------|----------------------| | DTOs in Application.Contracts | DTOs in Services folder (same project) | | Repository interfaces in Domain | Use generic `IRepository<T, TKey>` directly | | Separate Domain.Shared for constants | Constants in same project | | Multiple module classes | Single module class | ## File Organization Group related files by feature: ``` Services/ ├── Books/ │ ├── BookAppService.cs │ ├── BookDto.cs │ ├── CreateBookDto.cs │ └── IBookAppService.cs └── Authors/ ├── AuthorAppService.cs └── ... ``` ## Simplified Entity (Still keep invariants) Single-layer templates are structurally simpler, but you may still have real business invariants. - For **trivial CRUD** entities, public setters can be acceptable. - For **non-trivial business rules**, still prefer encapsulation (private setters + methods) to prevent invalid states. ```csharp public class Book : AuditedAggregateRoot<Guid> { public string Name { get; set; } // OK for trivial CRUD only public decimal Price { get; set; } } ``` ## No Custom Repository Needed Use generic repository directly - no need to define custom interfaces: ```csharp public class BookAppService : ApplicationService { private readonly IRepository<Book, Guid> _bookRepository; // Generic repository is sufficient for single-layer apps } ```
GitHub에서 보기