SaaS/multitenancy support: dynamic connection string

5 posts, 0 answers
  1. Stanislaw
    Stanislaw avatar
    11 posts
    Member since:
    Sep 2008

    Posted 06 Jul 2011 Link to this post

    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)?
  2. Kosta Hristov
    Admin
    Kosta Hristov avatar
    13 posts

    Posted 08 Jul 2011 Link to this post

    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!

  3. DevCraft banner
  4. Stanislaw
    Stanislaw avatar
    11 posts
    Member since:
    Sep 2008

    Posted 08 Jul 2011 Link to this post

    Thanks, this what I'm expected for!
  5. Chom
    Chom avatar
    56 posts
    Member since:
    Dec 2009

    Posted 03 Jan 2013 Link to this post

    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
  6. Chom
    Chom avatar
    56 posts
    Member since:
    Dec 2009

    Posted 04 Jan 2013 Link to this post

Back to Top
DevCraft banner