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.

Related Post

One Response to “Swapping the DAL Abstractly”

Leave a Reply

Comment Policy:

  • You must verify your comment by responding to the automated email that is sent to your email address. Unverified comments will never show.Leave a good comment that adds to the conversation and I'll leave your link in.
  • Leave me pure spam and I'll delete it.
  • Leave a general comment and I'll remove the link but keep the comment.

Notify me of followup comments via e-mail

Bear