How to set cuncurrency control based on backend during runtime?

3 posts, 1 answers
  1. Richard Koslik
    Richard Koslik avatar
    71 posts
    Member since:
    Apr 2010

    Posted 08 Feb 2013 Link to this post

    Hello,

    is it somehow possible to set the concurrency mode of all tables/classes contained in the .rlinq file during runtime/startup based on the database to use?
    I have override the CreateDataContext() methode to select the database i want ot work with.
    protected override My_DomainContext CreateDataContext()

    {
    ....
                  var dbTarget = ConfigurationManager.AppSettings["DB"];
                  if (dbTarget == "mssql")
                  {
                    connectionString = "MSSQLConnection";
                    dbConfig.Backend = "mssql";
                  }
                  else if (dbTarget == "oracle")
                  {
    .....
                  return new My_DomainContext(connectionString, dbConfig, metadataSource);
    }

    Can it be done somewhere here?

    regards Richard.
  2. Answer
    Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 12 Feb 2013 Link to this post

    Hello Richard,

    I have prepared a sample application which demonstrates how to set concurrency control for the persistent types in the metadata container.

    Additional helpful information can be found here.

    Hope that helps.

    Greetings,
    Damyan Bogoev
    the Telerik team
    Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
  3. DevCraft banner
  4. Richard Koslik
    Richard Koslik avatar
    71 posts
    Member since:
    Apr 2010

    Posted 12 Feb 2013 Link to this post

    Hello Damyan,

    thank you, thats what i have looked for...

    regards
    Richard.
Back to Top