Skip to content

Commit

Permalink
Test for #8864
Browse files Browse the repository at this point in the history
Resolves #8864
  • Loading branch information
AndriySvyryd committed Aug 12, 2019
1 parent 87aaf63 commit 35b51ea
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,32 @@ from c in cs
select c.City);
}

[ConditionalFact]
public virtual void Select_nested_projection()
{
using (var context = CreateContext())
{
var customers = context.Customers
.Where(c => c.CustomerID.StartsWith("A"))
.Select(c => new
{
Customer = c,
CustomerAgain = Get(context, c.CustomerID)
})
.ToList();

Assert.Equal(4, customers.Count);

foreach (var customer in customers)
{
Assert.Same(customer.Customer, customer.CustomerAgain);
}
}
}

private static Customer Get(NorthwindContext context, string id)
=> context.Customers.Single(c => c.CustomerID == id);

[ConditionalTheory(Skip = "Issue#16314")]
[MemberData(nameof(IsAsyncData))]
public virtual Task Select_nested_collection(bool isAsync)
Expand Down

0 comments on commit 35b51ea

Please sign in to comment.