Different databases for the same application asp.net C #

1

In a club management system each club has its own database.

There is a DAL class where it is in charge of getting the web.config to string from application connection .

How to ensure that the login application loads the correct database as the club?

    
asked by anonymous 15.01.2015 / 14:17

2 answers

4

A simple way to do this would be to create a table specifying the database of each club (I am not talking about putting bank access data), so when the user of a club logs in, you can check in which bank the club belongs.

Ex:

Abs,

    
15.01.2015 / 14:42
1

You could have a main database, where you will find common tables, such as user for example.

In it you will have the information of which database is used by that user.

Consequently, you would need to have two DAL structures to support this action.

But ....

From what I understand all clubs have their own database but all bases are in one place, right? If so, I would consider unifying the bases, leaving a single database and putting the information in the records stating which club that record is.

This would make it easier, for example, to have consolidated information from several clubs of the same owner, for example.

    
15.01.2015 / 14:31