Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EF.Functions.Ilike no longer being parsed #670

Closed
drapka opened this issue Feb 8, 2023 · 1 comment
Closed

EF.Functions.Ilike no longer being parsed #670

drapka opened this issue Feb 8, 2023 · 1 comment
Assignees
Labels

Comments

@drapka
Copy link

drapka commented Feb 8, 2023

Description

In version 6.2.24 or older we could write the following query:
var q = $"NpgsqlDbFunctionsExtensions.ILike(EF.Functions, People.Name, \"%{value}%\")";
In version 6.2.25 this is no longer working and exception of type System.Linq.Dynamic.Core.Exceptions.ParseException is thrown: No property or field 'Functions' exists in type 'EF'..

A similar problem occurs for base EF function Like. The way we use this is also discussed in the following question in stack overflow (see the answer there):
https://stackoverflow.com/questions/65221784/using-dynamic-linq-with-ef-functions-like

@StefH StefH self-assigned this Feb 8, 2023
@StefH StefH added the question label Feb 8, 2023
@StefH
Copy link
Collaborator

StefH commented Feb 8, 2023

@drapka
You need to set the config setting PrioritizePropertyOrFieldOverTheType to true and pass the config to your dynamic query,

https://github.com/zzzprojects/System.Linq.Dynamic.Core/blob/master/src/System.Linq.Dynamic.Core/ParsingConfig.cs#L222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants