Skip to content
Skills Library
Programming · Building & coding

abp-development-flow

/abp-development-flow

ABP Framework v10.x (10.4–10.6) development flow: adding a new entity end-to-end (Domain → Domain.Shared → repository → EF Core config → migration → Contracts/DTO → object mapping → app service → localization → permission → test). Use when you need the flow for adding a new feature in ABP.

Repository
abp-skills ↗
Licence
MIT
Last repository change
14.08.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 14.08.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

ABP Framework v10.x (10.4–10.6) development flow: adding a new entity end-to-end (Domain → Domain.Shared → repository → EF Core config → migration → Contracts/DTO → object mapping → app service → localization → permission → test). Use when you need the flow for adding a new feature in ABP.

Original author description

ABP Framework v10.x (10.4–10.6) development flow: adding a new entity end-to-end (Domain → Domain.Shared → repository → EF Core config → migration → Contracts/DTO → object mapping → app service → localization → permission → test). Use when you need the flow for adding a new feature in ABP.

How it works

  1. Trigger
  2. Step by Step (Layered Template)
  3. Quick Commands
  4. Checklist (New Feature)
  5. Related
Original SKILL.md headings · 199 lines, 667 words
SKILL.md preview
---
name: abp-development-flow
description: "ABP Framework v10.x (10.4–10.6) development flow: adding a new entity end-to-end (Domain → Domain.Shared → repository → EF Core config → migration → Contracts/DTO → object mapping → app service → localization → permission → test). Use when you need the flow for adding a new feature in ABP."
---

# ABP Framework — Development Flow

The flow for adding a new entity/feature **end-to-end** in ABP Framework v10.x (10.4–10.6) (layered template). Proceed across layers in the correct order.

## Trigger

- "ABP add new entity"
- "ABP add feature"
- "ABP end-to-end CRUD"
- "ABP development flow"
- "ABP how do I start"

## Step by Step (Layered Template)

### 1. Domain — Entity (`*.Domain/Entities/`)

```csharp
public class Book : AggregateRoot<Guid>
{
    public string Name { get; private set; }
    public decimal Price { get; private set; }
    public Guid AuthorId { get; private set; }

    protected Book() { }
    public Book(Guid id, string name, decimal price, Guid authorId) : base(id)
    {
        Name = Check.NotNullOrWhiteSpace(name, nameof(name));
        SetPrice(price);
        AuthorId = authorId;
    }

    public void SetPrice(decimal price) => Price = Check.Range(price, nameof(price), 0, 9999);
}
```

### 2. Domain.Shared — Constant/Enum (`*.Domain.Shared/`)

```csharp
public static class BookConsts { public const int MaxNameLength = 128; }
public enum BookType { Novel, Science, Biography }
```

### 3. Repository Interface (optional — only if a custom query is needed, `*.Domain/`)

```csharp
public interface IBookRepository : IRepository<Book, Guid>
{
    Task<Book> FindByNameAsync(string name);
}
```
For simple CRUD, `IRepository<Book, Guid>` is sufficient.

### 4. EF Core Configuration (`*.EntityFrameworkCore/`)

```csharp
// DbContext
public DbSet<Book> Books { get; set; }

// OnModelCreating
builder.Entity<Book>(b =>
{
    b.ToTable(MyProjectConsts.DbTablePrefix + "Books", MyProjectConsts.DbSchema);
    b.ConfigureByConvention();
    b.Property(x => x.Name).IsRequired().HasMaxLength(BookConsts.MaxNameLength);
    b.HasIndex(x => x.Name);
});
```

### 5. Migration

```bash
cd src/MyProject.EntityFrameworkCore
dotnet ef migrations add Added_Book
dotnet run --project ../MyProject.DbMigrator   # Recommended — also runs seed data
```

### 6. Application.Contracts — DTO + interface

```csharp
public class BookDto : EntityDto<Guid> { public string Name { get; set; } public decimal Price { get; set; } }

public class CreateBookDto
{
    [Required, StringLength(BookConsts.MaxNameLength)] public string Name { get; set; }
    [Range(0, 9999)] public decimal Price { get; set; }
    [Required] public Guid AuthorId { get; set; }
}

public interface IBookAppService : IApplicationService
{
    Task<BookDto> GetAsync(Guid id);
    Task<PagedResultDto<BookDto>> GetListAsync(PagedAndSortedResultRequestDto input);
    Task<BookDto> CreateAsync(CreateBookDto input);
}
```

### 7. Object Mapping (Mapperly — default since v10.4)

```csharp
[Mapper]
public partial class BookMapper : MapperBase<Book, BookDto>
{
    public override partial BookDto Map(Book source);
    public override partial void Map(Book source, BookDto destination);
}
```
Detail: [Object Mapping skill](../abp-object-mapping/SKILL.md).

### 8. Application — Service

```csharp
public class BookAppService : ApplicationService, IBookAppService
{
    private readonly IRepository<Book, Guid> _bookRepository; // or IBookRepository

    public BookAppService(IRepository<Book, Guid> bookRepository) => _bookRepository = bookRepository;

    public async Task<BookDto> GetAsync(Guid id)
        => ObjectMapper.Map<Book, BookDto>(await _bookRepository.GetAsync(id));

    [Authorize(MyProjectPermissions.Books.Create)]
    public async Task<BookDto> CreateAsync(CreateBookDto input)
    {
        var book = new Book(GuidGenerator.Create(), input.Name, input.Price, input.AuthorId);
        await _bookRepository.InsertAsync(book);
        return ObjectMapper.Map<Book, BookDto>(book);
    }
}
```

### 9. Localization (`*.Domain.Shared/Localization/*/en.json`)

```json
{ "Book": "Book", "Books": "Books", "BookName": "Name", "BookPrice": "Price" }
```

### 10. Permission (if needed, `*.Application.Contracts/`)

```csharp
public static class MyProjectPermissions
{
    public static class Books
    {
        public const string Default = "MyProject.Books";
        public const string Create = Default + ".Create";
    }
}
```

### 11. Test

```csharp
public class BookAppService_Tests : MyProjectApplicationTestBase
{
    private readonly IBookAppService _bookAppService;
    public BookAppService_Tests() => _bookAppService = GetRequiredService<IBookAppService>();

    [Fact]
    public async Task Should_Create_Book()
    {
        var result = await _bookAppService.CreateAsync(new CreateBookDto { Name = "Test", Price = 19.99m });
        result.Id.ShouldNotBe(Guid.Empty);
    }
}
```
Detail: [Testing skill](../abp-testing/SKILL.md).

## Quick Commands

```bash
dotnet build
cd src/MyProject.EntityFrameworkCore && dotnet ef migrations add MigrationName
dotnet run --project ../MyProject.DbMigrator   # apply migration + seed
abp generate-proxy -t ng                       # Angular proxy
```

## Checklist (New Feature)

- [ ] Entity (constructor + invariant)
- [ ] Domain.Shared constant/enum
- [ ] Custom repo interface (only if needed)
- [ ] EF Core config + `ConfigureByConvention()`
- [ ] Migration + DbMigrator
- [ ] DTO + service interface (Application.Contracts)
- [ ] Mapperly mapper
- [ ] Service implementation + authorization
- [ ] Localization keys
- [ ] Permission (if needed)
- [ ] Test

## Related

- [DDD](../abp-ddd/SKILL.md) — entity/aggregate/service design
- [EF Core](../abp-efcore/SKILL.md) — DbContext, migration
- [Object Mapping](../abp-object-mapping/SKILL.md) · [Authorization](../abp-authorization/SKILL.md) · [Localization](../abp-localization/SKILL.md) · [Testing](../abp-testing/SKILL.md)
- [Dependency Rules](../abp-dependency-rules/SKILL.md) — which code in which layer
- ABP Docs: https://abp.io/docs/latest/tutorials

Versions

RepositoryScoreLicence
This page · burakdmir/abp-skills100MIT
burakdmir/abp-skills100MIT

Database snapshot: 13.11.2026 · package version edc999dde27c (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100abp-ddd
    ABP Framework v10.x (10.4–10.6) 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.
  • 100abp-object-mapping
    ABP Framework v10.x (10.4–10.6) object mapping: IObjectMapper, Mapperly (default since v10.4, MapperBase), AutoMapper profiles, entity↔DTO conversion, AutoMap attributes. Use when you need object mapping or DTO mapping in ABP.
  • 100customize-application-modules
    Extends or customizes a pre-built ABP module (Identity, Account, etc.) referenced as NuGet packages without editing its source. USE FOR: adding extra entity/DTO properties via the module extension system, mapping extra properties to real EF Core columns, replacing/overriding…
  • 100layered-architecture
    Organize an ABP solution/module into DDD layers and decide which project a given type belongs in. USE FOR: laying out the *.Domain.Shared / *.Domain / *.Application.Contracts / *.Application / *.EntityFrameworkCore / *.MongoDB / *.HttpApi / *.HttpApi.Client / *.Web|*.Blazor…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.