1. Sabir Foux
  2. SnapObjects
  3. Monday, 09 September 2019

This may be more of a question I can post on the dotnet forums but I wanted to asked for the expert opinion from the Appeon community first.

Lets say I create a web api from my data windows using the C# generator. I want to have a database for each tenant/client. I need to be able to call the right database based on a value passed to the web api (could be a key, id, connString, etc). How would I dynamically select the right database based on that value using, for example, an ODBC connection to a SQL Anywhere database?

 

Our need: We need to be able to call the web api with the data + the ID for the intended database at runtime.

Question: How would we dynamically select the right database at runtime?

Accepted Answer
Sabir Foux Accepted Answer Pending Moderation
0
Votes
Undo

I found the FactoryDemo example from another post and I've been going through that to see how I can use it in my project. It may have the answers for me.

Comment
Hello please have you the link to that post or the link to download FactoryDemo example

Thanks
  1. LUIS MEDINA
  2. Tuesday, 10 September 2019
Here is the post with the Factory Demo example. I was able to find this link after all.

https://community.appeon.com/index.php/qna/q-a/dynamic-connections-with-snapobjects
  1. Sabir Foux
  2. Tuesday, 10 September 2019
There are no comments made yet.
  1. Tuesday, 10 September 2019
  2. SnapObjects
  3. # Permalink
Sabir Foux Accepted Answer Pending Moderation
0
Votes
Undo

Hello Luis,

I can't find the exact post. I know I saved the bookmark somewhere but it would be easier to just give you the file. If you have the same challenge perhaps you can study the code and figure out how to use it for your project. 

Good luck!

Attachments (1)
Comment
There are no comments made yet.
  1. Tuesday, 10 September 2019
  2. SnapObjects
  3. # 1
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.