EntityFramework.Utilities
EntityFramework.Utilities copied to clipboard
IncludeEFU throws System.InvalidOperationException exception
When trying to use IncludeEFU to include a child collection, a InvalidOperationException is thrown when enumerating the query result. The exception message is: "The property 'p' on type 't' cannot be set because the collection is already set to an EntityCollection."
This happens on line: setter(parent, childs); in EFQueryHelper.cs
Never mind, it works fine after disabling proxy generation.
Thank you!
I will actually reopen this issue and update the documentation + add better exceptions for next release.
This is also a problem with Lazy Loading. Fix both in the same way.