Open Closed

Multiple Database support #6


User avatar
0
bhyatz created

We wish to support multiple databases, both oracle using the devart driver and SQL Server.
The current depends on EntityFrameworkCoreModule depends on AbpEntityFrameworkCoreSqlServerModule.
We wish to be able to switch between oracle and sql server using a configuration setting in the appsettings.json.
1. If we remove the AbpEntityFrameworkCoreSqlServerModule module and change the
Configure<AbpDbContextOptions>(options =>
{
options.UseSqlServer();
}
to options.UseOracle(); will this just work.
2. Can we change this setting to
if(dbType == "Oracle")
{
options.UseSqlServer();
}
else {
options.UseOracle();
}
3. The current geenrated EntityFrameworkCoreModule depends on AbpEntityFrameworkCoreSqlServerModule,
If we do this and take out [DependsOn(typeof(AbpEntityFrameworkCoreSqlServerModule)] will sql server still work? if we leave it will oracle work?
4. I tried changing the table names to snake case, this worked for the migrations but at runtime the modules don't use the conversion. Is it possible to make the modules work with the snake case naming convension.


1 Answer(s)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 25, 2025, 11:10