This question is locked. New answers and comments are not allowed.
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)?
Can I adapt OpenAccess to the requirements above (support for dynamic connection)?
4 Answers, 1 is accepted
0
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
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
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
OK! Got it resolved with information from here.
http://www.telerik.com/help/openaccess-orm/fluent-mapping-creating-custom-context.html
Chom
http://www.telerik.com/help/openaccess-orm/fluent-mapping-creating-custom-context.html
Chom