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

Trouble quering from two contexts

4 Answers 32 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.
Seabus
Top achievements
Rank 1
Seabus asked on 24 Aug 2011, 12:38 AM
Hi,

Is it possible to have a query that combines two contexts ?

using ( var myStudentContext = new StudentContext())
{
   using ( var myConsumerContext = new ConsumerContext())
  {
         var query = whatever query that uses both contexts
  }

}

I tried doing this but OpenAccess gave some weird error so I just want to know if this typ eof quering is supported or not.

Seabus

4 Answers, 1 is accepted

Sort by
0
IT-Als
Top achievements
Rank 1
answered on 24 Aug 2011, 09:05 AM
Hi Seabus,

I am almost 100 percent sure that this is not possible with OA.

What are the reasons for having two contexts?

Regards

Henrik
0
Damyan Bogoev
Telerik team
answered on 26 Aug 2011, 12:11 PM
Hello Henrik,

Could you please with us more details regarding the scenario that you plan to combine two contexts?
A sample application or code snippet will be highly appreciated. We will do our best to provide you with solution to this problem.
We are looking forward to hearing from you.

Best wishes,
Damyan Bogoev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's SQL Server Community Awards. We are competing in TWO categories and every vote counts! VOTE for Telerik NOW >>

0
IT-Als
Top achievements
Rank 1
answered on 26 Aug 2011, 12:13 PM
Hi Damyan,

Sorry, I cannot do that, because I don't know what the reasons for the two contexts are.

But, maybe Seabus (the poster of the question) can provide the info...

/Henrik
0
Damyan Bogoev
Telerik team
answered on 26 Aug 2011, 12:29 PM
Hello Henrik,

@Henrik: I am sorry for the wrong request. Actually I would like Sebastian to provide us with this information.
@Sebastian: Could you please with us more details regarding the scenario that you plan to combine two contexts? A sample application or code snippet will be highly appreciated. We will do our best to provide you with solution to this problem.
We are looking forward to hearing from you.

Best wishes,
Damyan Bogoev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's SQL Server Community Awards. We are competing in TWO categories and every vote counts! VOTE for Telerik NOW >>

Tags
General Discussions
Asked by
Seabus
Top achievements
Rank 1
Answers by
IT-Als
Top achievements
Rank 1
Damyan Bogoev
Telerik team
Share this question
or