When to use Adapter:
When the project targets multiple database types and/or multiple schemas/catalogs.
Ok, my application needs to integrate with the Marketing and Sales database (SQL Server), and to be able to fully seperate my business logic, I decided to use the adapter pattern. So, from what I have gathered so far, I need to generate a total of six LLBL projects (Marketing, Sales, WC).
What I am thinking is that I have one component, business.services, who handles all the business process/logic. And all my controller classes inherit directly from a ControllerBase class. This guy is responsible for creating DataAccessAdapter objects and setting the connection string/catalog name, so I can switch dynamically at run-time between production and test mode. Because my application needs to integrate with the marketing and sales databases, I'll use the factory pattern to construct the appropriate DataAccessAdapter object based on the derived class, and return interface references rather than concrete refs.
I guess my main question is that I can't decided if this is the way to go, or have three completly seperate business components, one for each database (marketing, sales, wc).
Anyone else have to do something like this?