Suggest reading up on these concepts from the below links and elsewhere:
Essentially, you want to achieve loose coupling around the external data access library (datalib.dll
). This could be achieved in many ways - from a simple DataAccess class to more extensible Repository type factory classes.
You would have to make that choice, based on the cost vs. benefits in each approach. Hope this helps.