Dears,
I created an application with the name 'Main' then I added a new Module with the name 'Sub', then I generated a new entity in module 'Sub' using abp suite, generated the angular components, added the DTO, entities, etc.
What I am trying to do is:
Add a new migration for the Sub/Entity since the abp suite is not adding the migrations.
How to do it keeping Module Sub isolated from the main application.
Thanks in advance.
- ABP Framework version: v7.0.2
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
11 Answer(s)
- 
    0Add a new migration for the Sub/Entity since the abp suite is not adding the migrations. You can run the dotnet ef migrations add xxxcommand to add a new migration file.How to do it keeping Module Sub isolated from the main application. Do you mean that you want the module as a standalone application? if so, you can run the HttpApi.Host project, it will be used as an independent API service. If I misunderstand please let me know. 
- 
    0Thank you for your response, where should I run mentioned command ? I think I didn't explain my issue well. I need to use the module as a part of any solution I make and I need the migrations to be a part of it. Thanks 
- 
    0Hi, If you configure the module dependency correctly, you can run the command in EntityFrameworkCoreof the main application.I need to use the module as a part of any solution I make and I need the migrations to be a part of it. It is already there. you can use the module in any solution. there are two ways: - Referenced by project source code
 This way, you need to copy the modue source code always when you start a new solution. - Referenced by nuget package
 You can push the module to your private Nuget server, and install them to the solution, just like we do: 
- 
    0Hello Liang, Since I am using the abp suite, I think the configuration should be correct cause I am not the one who configured it. Unfortunately, running the command in main ef project is not working with the Sub DbContext. 
- 
    0I created an application with the name 'Main' then I added a new Module with the name 'Sub', How do you add the module Sub?The suite didn't support it, you need to add the Submodule toMainmanually.We have an example for this: https://github.com/abpframework/abp-samples/tree/master/BookStore-Modular 
- 
    0I added it via abp suite. - Select application solution.
- Navigate to modules.
- Then create new module.
 This will generate a new module and append it to the solution. I am not sure what do you mean by it is not supported via suite. Do you mean it is buggy and not working? Cause it is there and I can add the module via it. 
- 
    0
- 
    0
- 
    0Anyway as a workaround I just added the migration files to the main ef project manually. Yes, you need to add the migration file manually 
- 
    0Ok Thank you, but I think adding the migrations as a part of the main EF project will not keep the "Sub" module isolated. 
- 
    0Hi, If you want to keep the sub-module independent, you should use it as a separate application deployment. But it will make your project more complex, it used to be a single application, but now it has become a distributed application I can show you how to do it if this is what you want. 



 
                                