-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.0] Multi-Tenancy #666
Comments
This is a great question, unfortunately, I don't believe that Restier is abstracted enough to be able to address different EDM models at different URLs. Now, if it was the exact same data model, just different connection strings, I believe that would be possible. But the Model lookup routines in Restier are not ideal, and I ran into problems before when I had different data models under the same service. I can't recall if I fixed it or not. Sorry if that is not more helpful. |
after some trial and error I got the following startup code working, not sure if it works 100% yet
and in the model builder
|
Hey that looks like it could work! Sounds like what's going to be really important here is unit test coverage of the API... you should look at the unit tests here to see how we leverage a library I wrote called Breakdance to help test Restier methods. You will probably want to do something similar to make sure your tenant-based APIs are working. Also, you'll want to make sure you're always using HTH! 👊 |
Let's make sure we have at least one solid approach for multi-tenancy in Restier 2.0. |
Hello @robertmclaws, I managed to configure the RESTier library to work with multitenant (different databases) in the following way: 1 - Creating a middleware to get from the api route the tenant identifier; Apparently it worked correctly, let me know if this approach has been tested before, and if it can be considered safe. |
we are converting our RESTier server to a Multi-tenant server and I was wondering if RESTier has support for that.
is there a built-in way to register an EDM model per tenant?
and if not what would be the best way to approach this?
some background:
our RESTier servers are serving as middleware between our front-end apps and Microsoft CDS,
until now we supported only one CDS instance per server but now we must support a multi-tenant architecture
The text was updated successfully, but these errors were encountered: