You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fix for #12697 enables using a method defined like this in a query:
publicstaticTClient<T>(Ts)=>s;
The point being that the method is opaque to our query translator and therefore forces client evaluation. I want to suggest that we consider adding a method like that somewhere under the static EF class for better discoverability.
I haven't tested how well it works and I am not sure I understand all the implications but ideally this could be used both on the way in (to force funcletization of an expression that would otherwise be translated, i.e. a shortcut for having to write the expression outside the query) and on the way out (force client evaluation of an expression that would otherwise be translated).
Example usage:
vardata=(fromcindb.Checks
join ctindb.CheckTemplates.Include(a =>a.Implementers).ThenInclude(u =>u.User)
on c.CheckTemplateId equals ct.CheckTemplateIdwherec.CheckId==checkIdselectnew{CheckId=c.CheckId,Description=ct.Description,Implementers=EF.Client(ct).Implementers,NumExaminers=ct.Examiners.Count};
The text was updated successfully, but these errors were encountered:
The fix for #12697 enables using a method defined like this in a query:
The point being that the method is opaque to our query translator and therefore forces client evaluation. I want to suggest that we consider adding a method like that somewhere under the static EF class for better discoverability.
I haven't tested how well it works and I am not sure I understand all the implications but ideally this could be used both on the way in (to force funcletization of an expression that would otherwise be translated, i.e. a shortcut for having to write the expression outside the query) and on the way out (force client evaluation of an expression that would otherwise be translated).
Example usage:
The text was updated successfully, but these errors were encountered: