Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Multitenant Application set connection string

$
0
0

Hi

I am creating a multitenant application that will store the users data either in separate databases or a single database using a TenantId to query data.

I have got as far as the user being able to register using the asp identity framework and I store the tenantId and connection string info with the user and subsequently store this in a claims token.

My question is what's the best way to set this id and connection string dynamically. I have a Product repository that uses a base repository that creates the dbContext and sets the connection string. Do I just pass the Id and Connection String into the controller and onto the Product repository and then onto the base repository from the claims token.

Any advice would be greatly appreciated.

Thanks

John 


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>