How to use multiple databases in a single project?
Hi there, I've created the application using the template from abp.io with Angular and EntityFrameworkCore with MySQL as database.
I have this scenario - a. There are 3 different databases. First, Second and Third. b. Second is a database created for Hangfire implementation. c. I need to update a few tables from First Database to Third Database using the Hangfire.
How to implement this?
Please provide any idea regarding this.
You can check the documentation first. https://docs.abp.io/en/abp/latest/Connection-Strings https://docs.abp.io/en/abp/latest/Entity-Framework-Core
@maliming It means I have to create another module for using another database for the same project.
Can you please clarify the following: I have a first module using the first database. I created another module for the second database. How can I implement the repositories from the models in the second database to the first one?
pls do as the best practice if you want to use abp vnext! what is best practice pls see https://docs.abp.io/zh-Hans/abp/latest
@anaya-upadhyay Check this #2139 issue, the last one comment works for me.
But you must pay attention to that the first line in Configure method is not Generic options.UseXxx() , the following is Generic options.UseXxx<YourAnotherDbContext>().
I think the first line without a generic parameter configures for the default dbprovider used by abp modules, and the others configure for the special dbContext type as a generic parameter.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Take a look at : https://github.com/abpframework/abp/issues/4251 Maybe it helps you