0

I am designing code for a new project. There would be many client specific databases with EXACTLY same schema. These databases would store employee of the respective client orgnization.And there would be a MASTER database which will store db connection string against client_id.So on any request master db will be first queried to get the connection string for the client. Then respective client db will be connected to get the user/employe details. in other words Depending on employee from which client is requesting, connection string will be fetched from master db and then client specific db will be connected to validate client's employee id/password -One db(which stores a connectio string for each client ) -Multiple client db instances with exactly same schema(stores employee of the client organization)

Can someone suggest if I should use code first or db first and WHAT DESIGN PATTERN should I use here?

Rajeev
  • 1
  • 1

1 Answers1

0

I would suggest you to go with the code first approach. As I understand your description you're not starting from existing db, so coding first would be better in terms of maintenability of the whole system (as long as you're confident with migrations).

On top of that, if you'll have to deal with authorization (seems like the case), I would suggest you to take a look to the Asp Net Identity, which offer an effective schema for user / role management.