I published eShopOnWeb_VB.NET which is the VB.NET version of the Microsoft full web sample eShopOnWeb
The solution contains 3 projects:
- Web.vb (a VB.NET ASP.NET Core 3.1 project).
- Infrastructure.vb (a VB.NET .NET standard library project).
- ApplicationCore.cs (a C# .NET standard library project):
The repo also contains a VB.NET version named ApplicationCore.vb, but if you referenced it in the solution instead of the C# version, it will causes a runtime exception. I couldn't find the source of this exception, and I compared the C# and VB.Net versions of the project and they seems identical, with no obvious VB.NET special behavior that can cause the exception.
This project contains the database entities and other classes used in query operations.
This is the exception:
InvalidOperationException: Lambda expression used inside Include is not valid.
Microsoft.EntityFrameworkCore.Query.Internal.NavigationExpandingExpressionVisitor.ProcessInclude(NavigationExpansionExpression source, Expression expression, bool thenInclude)
What is the source of this exception?
Is there any EF convention that can be broken by different naming of properties backing fields or something similar?
Is it related to expression tree that VB generates?
How can I solve this?
I published eShopOnWeb_VB.NET which is the VB.NET version of the Microsoft full web sample eShopOnWeb
The solution contains 3 projects:
The repo also contains a VB.NET version named ApplicationCore.vb, but if you referenced it in the solution instead of the C# version, it will causes a runtime exception. I couldn't find the source of this exception, and I compared the C# and VB.Net versions of the project and they seems identical, with no obvious VB.NET special behavior that can cause the exception.
This project contains the database entities and other classes used in query operations.
This is the exception:
What is the source of this exception?
Is there any EF convention that can be broken by different naming of properties backing fields or something similar?
Is it related to expression tree that VB generates?
How can I solve this?