System.Linq.Dynamic.Core.Exceptions.ParseException: 'Enum type '..' not found'
I have a code block as shown below:
string name = "ball";
byte languageId = 1;
var q = QueryRepository.Query.WhereTranslate(languageId, y => y.ProductName == name);
I'm transforming the expression I sent within the WhereTranslate method with the following code block:
var linqQuery = predicate.ToString().Replace("ProductName", "Value");
When I try to convert this transformed code block back into a LINQ query in a retransformed manner, I encounter the following error:
System.Linq.Dynamic.Core.Exceptions.ParseException: 'Enum type '..' not found'.
There is no issue when I manually write the LINQ expression, but the problem arises when I try to re-parse the "name" value that has been passed into the query parametrically. How can I overcome this issue?
@buraksv Please provide a full working :
- https://dotnetfiddle.net/ OR
- dotnet console app
@buraksv Can you please provide a full working example or .net fiddle or console-app?
@buraksv Can you please provide a full working example or .net fiddle or console-app?
@buraksv Can you please provide a full working example or .net fiddle or console-app?
@buraksv Can you please provide a full working example or .net fiddle or console-app?