This is a migrated thread and some comments may be shown as answers.

SaaS/multitenancy support: dynamic connection string

4 Answers 131 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stanislaw
Top achievements
Rank 1
Stanislaw asked on 06 Jul 2011, 10:31 AM
I'm architecting a set of applications that will published via SaaS model. So one application will serve many customers and each of them will have its own database. So I need multitenancy support, i.e. each web request routes into its own database
Can I adapt OpenAccess to the requirements above (support for dynamic connection)?

4 Answers, 1 is accepted

Sort by
0
Kosta Hristov
Telerik team
answered on 08 Jul 2011, 05:54 PM
Hello Stanislaw,

You can use one of the non-default constructor overloads of the context class, specifically the one that takes a connection as parameter. This way you will be able to build a connection string based on the current user credentials and obtain a connection.
You can also use the SqlConnectionStringBuilder class to build the connection string more easily.
Hope that helps.

All the best,
Kosta
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Stanislaw
Top achievements
Rank 1
answered on 08 Jul 2011, 05:57 PM
Thanks, this what I'm expected for!
0
Chom
Top achievements
Rank 1
answered on 03 Jan 2013, 06:53 PM
Hello,
I am looking to build a connection string as a parameter. Can you point me to some more information on the non-default constructor overloads please.

Thank you

Chom
0
Chom
Top achievements
Rank 1
answered on 04 Jan 2013, 04:29 PM
Tags
General Discussions
Asked by
Stanislaw
Top achievements
Rank 1
Answers by
Kosta Hristov
Telerik team
Stanislaw
Top achievements
Rank 1
Chom
Top achievements
Rank 1
Share this question
or