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

How to set cuncurrency control based on backend during runtime?

2 Answers 38 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.
Richard Koslik
Top achievements
Rank 1
Richard Koslik asked on 08 Feb 2013, 10:26 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Damyan Bogoev
Telerik team
answered on 12 Feb 2013, 07:53 AM
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.
0
Richard Koslik
Top achievements
Rank 1
answered on 12 Feb 2013, 08:35 AM
Hello Damyan,

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

regards
Richard.
Tags
General Discussions
Asked by
Richard Koslik
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Richard Koslik
Top achievements
Rank 1
Share this question
or