I’m running into a design problem in my C# application. I have a DAL which supplies data for several different customers from different databases. Until now these databases have had the same tables and field names, but now i have one database which has different field names, because the customer wants the field names to be of locale language instead of english.
How do i solve this?
My current application achitecture is based on factories. So i have this:
BusinessFactory initialzes the DAL, so my first thought was to just extend the DAL and then override the function where the database field names needs to be changed and make a new function in the extending class. But when should i initialize this extending class?
I can’t do it from my BusinessFactory because the DAL is depending on a Interface.
Please, also point me the other direction if I’m all wrong about extending the DAL as a solution to this problem.
I think you must be having a client -> db mapping in place based on which you decide that which db to connect to.
So you can introduce a pre processor layer to figure out the column names you need to get from database. So basically you will keep a per client config (and a default config) which you can use.