Swapping the DAL Abstractly
Last Thursday, we looked at how to replace the TableAdapter with our own TableAdapter as a way or eliminating our dependence on Microsoft SQL. The problem with this implementation is that every time you want to switch databases, you’ll need to switch what TableAdapter the code is using.
Under normal circumstances, this isn’t an issue. Most of us pick a database and stick with it. But, there are times when we’d like to be able to have our product support multiple databases. Maybe we have a Windows application that will work fine using an Access database for example, but we know that in larger installations they’d be much happier with a SQL implementation. Or maybe we have customers that have a religious conviction toward a specific implementation of SQL.
Today, I’m going to show you the first step in how to write your code in such a way that the BLL will not need to change every time you switch the DAL.
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!




















































April 2nd, 2008 at 7:33 am
[...] and 3-Tier ASP.NETDatasets StoredProcedures and 3-Tier ASP.NETSwapping Out the Data Access LayerSwapping the Data Access Layer AbstractlyUsing Reflection to Load a Class in [...]