Some Entity Framework 5 query not working after migrating solution from VS 2012 to VS 2019

Zeng, Sheng (TBS) 1 Reputation point
2021-07-18T12:47:07.563+00:00

We use EF5 in our project. The same code was working in VS 2012. After migrated solution from VS 2012 to VS 2019, some EF query got the following exception:
"System.NotSupportedException: Unable to create a constant value of type ''. Only primitive types or enumeration types are supported in this context." Does anyone have the similar experience?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,415 questions
{count} votes