0

I'm getting this error message when attempting a Linq query with a number of includes.

Was working in .NET 5; breaking after an upgrade to .NET 6.

System.NotImplementedException: This is a DynamicProxy2 error: The interceptor attempted to 'Proceed' for method 'Microsoft.EntityFrameworkCore.Infrastructure.ILazyLoader get_LazyLoader()' which has no target

Any help appreciated

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Davious
  • 1,833
  • 2
  • 15
  • 16
  • You can refer to this article, if it doesn't work for you, can you show your code?https://stackoverflow.com/questions/67764064/ef-core-w-lazy-loading-notimplementedexception-this-is-a-dynamicproxy2-error – Tupac Mar 04 '22 at 02:12

1 Answers1

0

There is quite the chance that a circular reference is in place. Once there is an error with the returned result from the query, the lazy loader would not return the erroneous response and instead return this message in .NET Core 6.

Recommendation: Double check the relationships between the entities (this has solved the problem for me).

Amjad Abujamous
  • 736
  • 9
  • 9