Skip to content

Improve exception message when EF.Function is evaluated on the client. #35940

Open
@maumar

Description

@maumar

EF Functions throw FunctionOnClient exception when they are actually invoked (rather than translated to SQL).
Currently the message is as follows:

The '{methodName}' method is not supported because the query has switched to client-evaluation. This usually happens when the arguments to the method cannot be translated to server. Rewrite the query to avoid client evaluation of arguments so that method can be translated to server.

This could also happen in the funcletizer, when the function is evaluatable (i.e. no arguments are correlated to the model but rather they are all constants). We should add that information to the exception

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions