Click here to Skip to main content
15,882,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a data system created with MS Sql Server. The system works with 28 tables. We create a customer-specific database containing the same tables for each customer to whom we sell the product. and there is a separate database where we store customer information. But at the same time, we open a port for each client and start a service. This is not useful for us with the increasing number of customers. I just want to publish a service and add config to the service for client database information in IIS and direct the api to the relevant database with a parameter or header parameter added to the url requests (obviously I have no idea how). Can you help on how to do this?

What I have tried:

Unfortunately I haven't been able to try anything. because i don't know about service start.
Posted
Updated 6-Jan-23 12:48pm
v2
Comments
0x01AA 4-Jan-23 14:25pm    
google for 'Authentication' and also maybe for future for 'Authentication vs. Authorization'. It should give you an idea what you need.

E.g. you can start reading here: Authentication vs. Authorization[^]
[no name] 4-Jan-23 15:53pm    
It's in the SQL: USE [database]

1 solution

The term you're looking for is "multi-tenancy".

For example:
Multi-tenant Apps With EF Core and ASP.​NET Core[^]

Your scenario seems to fall under the section titled "Isolated Databases Multi-tenancy with EF Core".
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900