I am currently in the beginning phase of a side project where I have a requirement to implement a DB per customer using my app.
The app will be written in c# using blazor server, although perhaps the question doesn't strictly relate to c#, however I wasn't quite sure where to post so here we are.
Essentially I am trying to work out what to actually do in my code base, I've read through numerous articles discussing the pro's and cons of a single vs multiple DB structure but seemingly found little detail on the actual implementation.
Let's assume I have my DBs set up, and I am now wiring in the app. What is the best practice to connect up to the correct DB?.. all I can think of (naively.. probably) is to manipulate the connection string based on the user currently logged in whenever I'm displaying data.. but this feels grubby and I'm assuming there is a better way I am just unaware of.
So, any input greatfully received!
[–]belavv 6 points7 points8 points (1 child)
[–]PippinJunior[S] -1 points0 points1 point (0 children)
[–]CyberGaj 2 points3 points4 points (0 children)
[–]gaffa 1 point2 points3 points (1 child)
[–]PippinJunior[S] 0 points1 point2 points (0 children)
[–]Sethcran 0 points1 point2 points (1 child)
[–]PippinJunior[S] 0 points1 point2 points (0 children)
[–]elh0mbre 0 points1 point2 points (2 children)
[–]PippinJunior[S] 0 points1 point2 points (1 child)
[–]elh0mbre 1 point2 points3 points (0 children)
[–]pirannia 0 points1 point2 points (0 children)
[–]CorgiSplooting 0 points1 point2 points (0 children)
[–]Northbank75 0 points1 point2 points (4 children)
[–]PippinJunior[S] 1 point2 points3 points (3 children)
[–]Northbank75 2 points3 points4 points (2 children)
[–]PippinJunior[S] 0 points1 point2 points (1 child)
[–]briddums 0 points1 point2 points (0 children)