If you need to support multiple RDBMS, consider abstracting the data access code behind some
ISomethingRepository
interface (say, exposing some
GetAllTablesInfo
method), and implementing that interface with
SqlSomethingRepository
,
OracleSomethingRepository
, and/or
MySqlSomethingRepository
classes, then code against
ISomethingRepository
and leverage
polymorphism to make the code work with any RDBMS, without needing to rewrite all the data access code; to support a new RDBMS, simply implement the interface and use the new class. c.f. "dependency injection" and OOP. —
Mathieu Guindon 1 min ago