Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression Test for joining DbSet from different contexts #13901

Merged
merged 1 commit into from Nov 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/EFCore.Specification.Tests/Query/SimpleQueryTestBase.cs
Expand Up @@ -57,6 +57,24 @@ protected virtual void ClearLog()

[ConditionalFact]
public virtual void Multiple_context_instances()
{
using (var context1 = CreateContext())
{
using (var context2 = CreateContext())
{
Assert.Equal(
CoreStrings.ErrorInvalidQueryable,
Assert.Throws<InvalidOperationException>(
() =>
(from c in context1.Customers
from o in context2.Orders
select c).First()).Message);
}
}
}

[ConditionalFact]
public virtual void Multiple_context_instances_2()
{
using (var context1 = CreateContext())
{
Expand Down