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?
2 Answer(s)
-
0
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:
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.
- Manually create the required projects (e.g.,
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.
-
0
Thanks for your question!
Currently, ABP Studio creates additional services with a minimal structure. You can check the detailed explanation and possible workaround here: 👉 https://abp.io/support/questions/7648/Unable-to-create-layering-for-microservices#answer-3a1447fd-ff9a-f065-3800-a436cfe3d88d