I have a mvc 5 web application which is working fine as of now for a client. I want to expose this web application as a product now so each client should have their own database to seperate out their data privacy. Now question arise if we choose different database then how MVC entity framework will work with different database because each client will be having seperate model which will impact edmx so Do we need to build a seperate code base for each client. Also Do we need to create seperate virtual directory for each client in IIS to seperate out their deployments so that one deployment will not impact other client.And down the line, if we have more than 100 clients what approach should follow and what piece of code need to pull as common. Below are some questions which should be followed as output:
1. Database must be seperate for client data privacy (client also can ask to share their database with them)
2. Each client should have their own virtual directory so that deployment can be managed easily and one deployment should not impact any other client
3. How application will connect with different database
4. Do we need to seperate the code base based on clients with database first approach or we need to modify code base to work with different clients
There could be other aspects as well but I am looking these points as of now. Please suggest me how can we go ahead on this and design application in such a way that maintenace should be easy and can be scale application later.