-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Milestone
Description
This results in different instances returned for the same entity:
[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)
{
// This fails
Assert.Same(customer.Customer, customer.CustomerAgain);
}
}
}
private Customer Get(NorthwindContext context, string id)
=> context.Customers.Single(c => c.CustomerID == id);Reactions are currently unavailable