I've been given the task of creating a site that will allow our various large clients to log into our website and click on our various pages to view analytics data based on their sales.
Does anyone have any idea about the best way to handle multiple databases based off the user? Lets say we have 3 big name clients, the design decision has been made each big client has their own database.
If a user from clientA logs into our system they should see the analytics for their company, and the model should be pulling down from clientA's data context. Likewise, if someone logs in and they are associated with clientB in the database then they need to have their data pulled from that data context.
If I can, I would like to have one Data Access Layer class written in LINQ and have some way of passing in the associated DataContext with that user when they login. Can anyone think of an appropriate or clean way to do this?