I have separate databases with the same schema I have to connect to customers who are connected. For example, if ClientA is connected, then I should be connected to DatabaseA; If Clientb is connected, then I should be connected to database; Now I have a multi-level application: a presentation layer, a service layer and a repository layer. With some arguments, I get the correct connection string!
So .. what do I need now?
I do not know where the connection string for that client will be stored! I was thinking in the session. But if I store it in session then I have to pass it in every call which I can do on the repository layer, because the session is not visible in the repository. I think this is the worst solution I could take.
I have to place only one repository layer in the global variable for that customer string selected.
Suggestions? If you want to keep global data for a web site - then you are able to store any data in
No comments:
Post a Comment