| name | abp-development-flow |
| description | ABP Framework v10.x (10.4/10.5) development flow quick reference: adding an entity end-to-end (Domain→Shared→repo→EF config→migration→Contracts/DTO→mapping→app service→localization→permission→test). Use when you need the flow for adding a new feature in ABP. |
ABP Framework — Development Flow
Adding a new entity end-to-end in the ABP v10.x layered template.
Trigger
"ABP add new entity/feature", "end-to-end CRUD", "development flow", "how do I start".
Flow
- Domain/Entities —
Book : AggregateRoot<Guid> (private setter, constructor invariant, Check.NotNullOrWhiteSpace).
- Domain.Shared —
BookConsts, enum.
- Domain (opt.) — custom
IBookRepository : IRepository<Book,Guid> only if a custom query is needed.
- EntityFrameworkCore —
DbSet<Book> + OnModelCreating:
builder.Entity<Book>(b => { b.ToTable(Prefix+"Books"); b.ConfigureByConvention(); b.Property(x=>x.Name).IsRequired().HasMaxLength(128); });
- Migration:
cd src/MyProject.EntityFrameworkCore
dotnet ef migrations add Added_Book
dotnet run --project ../MyProject.DbMigrator
- Application.Contracts —
BookDto : EntityDto<Guid>, CreateBookDto ([Required]/[Range]), IBookAppService : IApplicationService.
- Mapping — Mapperly
[Mapper] partial class BookMapper : MapperBase<Book, BookDto>.
- Application —
BookAppService : ApplicationService, IBookAppService; [Authorize(...)], GuidGenerator.Create(), ObjectMapper.Map<>().
- Localization —
*.Domain.Shared/Localization/*/en.json.
- Permission —
MyProjectPermissions.Books.Create (Application.Contracts).
- Test —
*ApplicationTestBase, GetRequiredService<IBookAppService>().
Commands
dotnet build
dotnet ef migrations add Name
dotnet run --project ../MyProject.DbMigrator
abp generate-proxy -t ng
Checklist
Entity → Shared → (repo) → EF config + ConfigureByConvention → migration/DbMigrator → DTO+interface → Mapperly → service+authorize → localization → permission → test.
Related