Open Closed

One method per application service #8472


User avatar
0
stephanobalbinot created
  • ABP Framework version: v9.0.0
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

My application services are starting to get too big and now I'm looking to refactor it to make one method per application service (with one interface, input and output dto). How do you recommend to implement this? Do ABP has some base classes for it? Should I extend ApplicationService base class in each service? How can I call each one in the controller?


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    How do you recommend to implement this?

    There is no limit on this; you can do this. It's just not common.

    Do ABP has some base classes for it? > Should I extend ApplicationService base class in each service?

    We have ApplicationService but you can use your own base class. you can refer the source code of ApplicationService

    https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs

    How can I call each one in the controller?

    As usual, inject the service interface and call the method.

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 18, 2025, 07:10