Skip to content

Consider always doing server evaluation for functions that don't have client implementation #11466

@divega

Description

@divega

For SQL Server we are adding the FreeText function in 2.1 that doesn't have a client evaluation. If we end up needing to evaluate this function after we have switched to client evaluation, we throw an exception.

Another example is DateTime.Now (and other similar properties). We want to evaluate this always on the server to avoid using inconsistent times and time zones.

We could instead turn this into a simple singleton query that evaluates the function on the server.

In the case of a function like FreeText, things are more complicated because it needs to be evaluated against a row in a table, but we can produce a query using the same table, the same columns and the same row (by using the key in the WHERE clause).

See the related discussion in the context of Npgsql support for full-text-search: npgsql/efcore.pg#315 (comment)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions