We support both Oracle and SQL. The columns are identical but the datatypes are not. (No Text, Blobs or stuff like that) But a customer is always SQL or alway Oracle...no switching going on.
So my understanding is that the adapter pattern with IDataAdapter soution will not work for me because the differences in datatypes.
So what I did was to create a MyDAL.dll that is SelfServicing built on SQL. Then I can build another MyDAL.dll based on Oracle. If I send the product to a customer with Oracle I give them the MyDAL.dll build on Oracle and visa versa. The only way to tell the difference between the two dll's would be to look at their properties to see the description information.
My business layer shouldn't care which DLL it is interacting with right?
The only problem seems to be duplicated code but:
- I didn't write it, LLBLGen did
- Supporting Oracle is a pain...just a matter of where you feel the pain.
What do you veterans think?
Sean