Open Trevortni opened 1 year ago
I don't get that exception but I get a different one.
System.Linq.Dynamic.Core.Exceptions.ParseException: 'No applicable method 'Like' exists in type 'DynamicFunctions"
The interesting thing is that I'm also using Npgsql. I wonder if the two things are related?
Has anyone ever got this to work? Being able to use the "LIKE" operator is a very important scenario.
Getting the same error as the previous answer:
System.Linq.Dynamic.Core.Exceptions.ParseException: 'No applicable method 'Like' exists in type 'DynamicFunctions"
When I open the source, I see the Like function is commented out. I tried to implement the class locally, exactly like in DynamicFunctions, but then the expression cannot be translated to SQL (because it passes my local method down to EF, instead of the EF.Functions one).
I also tried to use EF.Functions or DbFunctions.Instance, but that also does not seem to work. It always complains like "enum not found". Dynamic Linq does not seem to support static properties?
Has anyone found a way to do this? CustomTypeProvider or any other solution/hack?
I figured out a workaround!
1. Description
When attempting to use the Like operator as such:
I get the following exception
2. Exception
3. Fiddle or Project
Will attempt to further isolate issue tomorrow.
4. Any further technical details
Using Npgsql.EntityFrameworkCore.PostgreSQL 7.0.4 and EntityFrameworkCore 7.0.9