Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

Commit 0192e4c

Browse files
committed
rework condition
1 parent 5425070 commit 0192e4c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Source/LinqToDB.EntityFrameworkCore/LinqToDBForEFToolsImplDefault.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,9 @@ TransformInfo LocalTransform(Expression e)
901901

902902
if (typeof(IQueryable<>).IsSameOrParentOf(methodCall.Type) && methodCall.Type.Assembly != typeof(LinqExtensions).Assembly)
903903
{
904-
if (dc.MappingSchema.GetAttribute<ExpressionMethodAttribute>(methodCall.Type, methodCall.Method) == null
905-
&& null == methodCall.Find(nonEvaluatableParameters,
904+
if (((dc != null && !dc.MappingSchema.HasAttribute<ExpressionMethodAttribute>(methodCall.Type, methodCall.Method))
905+
|| (dc == null && !methodCall.Method.HasAttribute<ExpressionMethodAttribute>()))
906+
&& null == methodCall.Find(nonEvaluatableParameters,
906907
(c, t) => t.NodeType == ExpressionType.Parameter && c.Contains(t) || t.NodeType == ExpressionType.Extension))
907908
{
908909
// Invoking function to evaluate EF's Subquery located in function

0 commit comments

Comments
 (0)