Goran
Goran

Reputation: 6518

EF reference lookup

I load list of invoices, and I also loaded list of customers, using the same context. If I want to display invoices in a grid, where one column will contain customer's name, I need to somehow fix-up the relationship between the invoices and the customers.

How can I do this?

Upvotes: 0

Views: 51

Answers (1)

Goran
Goran

Reputation: 6518

The problem was that customers list was retrieved with MergeOption.NoTracking, so it was detached from context, and it could not look for relationship.

Upvotes: 1

Related Questions