Skip to content

Commit

Permalink
rework condition
Browse files Browse the repository at this point in the history
  • Loading branch information
MaceWindu committed May 18, 2023
1 parent 5425070 commit 0192e4c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -901,8 +901,9 @@ TransformInfo LocalTransform(Expression e)

if (typeof(IQueryable<>).IsSameOrParentOf(methodCall.Type) && methodCall.Type.Assembly != typeof(LinqExtensions).Assembly)
{
if (dc.MappingSchema.GetAttribute<ExpressionMethodAttribute>(methodCall.Type, methodCall.Method) == null
&& null == methodCall.Find(nonEvaluatableParameters,
if (((dc != null && !dc.MappingSchema.HasAttribute<ExpressionMethodAttribute>(methodCall.Type, methodCall.Method))
|| (dc == null && !methodCall.Method.HasAttribute<ExpressionMethodAttribute>()))
&& null == methodCall.Find(nonEvaluatableParameters,
(c, t) => t.NodeType == ExpressionType.Parameter && c.Contains(t) || t.NodeType == ExpressionType.Extension))
{
// Invoking function to evaluate EF's Subquery located in function
Expand Down

0 comments on commit 0192e4c

Please sign in to comment.