c# - Building a website with multiple database instances for each user type(.net) -


i building website big companies,the website same,but company "a" have sensitive data , want keep database @ place(server),the company "b" don't have sensitive data sow don't have problem keep database @ website server.how can (if possible) use database company "a" if user if type "a" logged in,and if user type"b" use database.i need change connection string each type of user,because each 1 of users-type(company) want have own database in place think safe.

i checking mvc/6 , asp.net5 decision.

which approach best?

thanks in advance!

there can several ways achieve this. 1 way use "security" database contain 2 data tables. 1 table contain connection string of main database. second table contain user credentials along data source user have access to..

enter image description here

when user logs in, program can corresponding connection string , based on login correct data source.

one user can have, if want, access multiple data source. once user logs in can redirected screen select database wants login into.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -