0

we have an Web API application and we want to use it for different project.I want to create different database for different clients whenever the client is registered. Can anyone tell me how to create database for different client using single Web API application when we submit the detail of Client?

suppose we are using abc Web API application and we register c1(client name) and now i want to create database c1DB(database name),similarly for other client

nit9290
  • 9
  • 1
  • Possible duplicate of [Creating a database programmatically in SQL Server](https://stackoverflow.com/questions/9015142/creating-a-database-programmatically-in-sql-server) – madteapot May 23 '17 at 10:31
  • I want to create database using Entity Framework. – nit9290 May 23 '17 at 10:35
  • what's the reason for this? One instance of the DB per API deployment would seem to make more sense. Then a "clients" table, and the rest of the data is associated with the appropriate client using the normal foreign key structure. Why would you need it in separate databases? Sounds like just duplicating the structure endlessly. – ADyson May 23 '17 at 10:36
  • we don't want to use same database because each client has different field and we want to store the data of each client in different database – nit9290 May 23 '17 at 10:54

0 Answers0