BUG: Virtual nav prop in child entity (TPT) is eager loaded and causes MARS error
I'm writing some sample code for a class using AdventureWorks 2012. I created POCO's for the Person.BusinessEntity and Person.Person tables setup for TPT inheritance. The Person entity has a nav prop for phone numbers to the PersonPhone entity. When I run this in a C# program, it works perfectly. I've verified with DbContext.Entry(...).Collection(...).IsLoaded that the nav prop is not being eager loaded. When I access it in a LINQPad query (eg from person in Persons) it crashes with a MARS error. I have sample code.
1
vote
YY Kosbie
shared this idea