Open Closed

Create Service N Layer #10019


User avatar
0
quannh@csdlquocgia.com created

I created a Microservice project using Abp Studio. I am creating an additional Service in the project but Abp Studio is only providing a no layer structure for Services. If I want to create a Service with an N Layer template, how can I do it?


1 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent

    To create a new microservice in an ABP microservice solution using ABP Studio, the default and currently supported approach is to use the "no layers" (service_nolayers) template. ABP Studio does not provide a built-in option to generate a new microservice with a full N-Layer (Domain, Application, EntityFramework, etc.) structure directly from the UI.

    If you require an N-Layer structure for your new service, you have two main options:

    1. Manual Creation:

      • Manually create the required projects (e.g., .Domain, .Application, .EntityFrameworkCore, .HttpApi, etc.) for your new service.
      • Follow the structure of existing layered microservices in your solution.
      • Register dependencies and configure your solution as needed.
    2. Custom Template:

      • Use the ABP CLI to generate a new layered service/module outside the solution, then add it manually to your microservice solution.
      • Example CLI command for a layered module:
    abp new MyCompany.MyService -t module
    
    • Move the generated projects into your solution and update references/configuration.

    Currently, ABP Studio's microservice addition wizard only supports the "no layers" template for new services. For more details and updates, refer to the official documentation below.

    Sources:


    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on October 21, 2025, 11:36