Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Closed Issue: Calling any function within SqlFunctions class inside LINQ query throws NullReferenceException [855]

$
0
0
When using SqlFunctions.Blah inside Linq query in EF6 we get NullReferenceException:
This used to work in previous version of EF.

System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.ConvertToCTypeFunction(System.Data.Entity.Core.Metadata.Edm.EdmFunction sTypeFunction)

System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.ConvertToCTypeFunctions(System.Collections.ObjectModel.ReadOnlyCollection<System.Data.Entity.Core.Metadata.Edm.EdmFunction> functionOverloads)

System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.GetCTypeFunctions(string functionName, bool ignoreCase)

System.Data.Entity.Core.Metadata.Edm.Perspective.TryGetFunctionByName(string namespaceName, string functionName, bool ignoreCase, out System.Collections.Generic.IList<System.Data.Entity.Core.Metadata.Edm.EdmFunction> functionOverloads)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.FindFunction(string namespaceName, string functionName, System.Collections.Generic.IList<System.Data.Entity.Core.Metadata.Edm.TypeUsage> argumentTypes, bool isGroupAggregateFunction, System.Linq.Expressions.Expression Expression)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.MethodCallTranslator.FunctionCallTranslator.TranslateFunctionCall(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter parent, System.Linq.Expressions.MethodCallExpression call, System.Data.Entity.DbFunctionAttribute functionAttribute)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter parent, System.Linq.Expressions.MethodCallExpression linq)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TypedTranslator<System.Linq.Expressions.MethodCallExpression>.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter parent, System.Linq.Expressions.Expression linq)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TranslateExpression(System.Linq.Expressions.Expression linq)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TranslateLambda(System.Linq.Expressions.LambdaExpression lambda, System.Data.Entity.Core.Common.CommandTrees.DbExpression input)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TranslateLambda(System.Linq.Expressions.LambdaExpression lambda, System.Data.Entity.Core.Common.CommandTrees.DbExpression input, out System.Data.Entity.Core.Common.CommandTrees.DbExpressionBinding binding)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter parent, System.Linq.Expressions.MethodCallExpression call, out System.Data.Entity.Core.Common.CommandTrees.DbExpression source, out System.Data.Entity.Core.Common.CommandTrees.DbExpressionBinding sourceBinding, out System.Data.Entity.Core.Common.CommandTrees.DbExpression lambda)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SelectTranslator.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter parent, System.Linq.Expressions.MethodCallExpression call)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SequenceMethodTranslator.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter parent, System.Linq.Expressions.MethodCallExpression call, System.Data.Entity.Core.Objects.ELinq.SequenceMethod sequenceMethod)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter parent, System.Linq.Expressions.MethodCallExpression linq)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TypedTranslator<System.Linq.Expressions.MethodCallExpression>.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter parent, System.Linq.Expressions.Expression linq)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TranslateExpression(System.Linq.Expressions.Expression linq)

System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.Convert()

System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(System.Data.Entity.Core.Objects.MergeOption? forMergeOption)

System.Data.Entity.Core.Objects.ObjectQuery.ToTraceString()

System.Data.Entity.Internal.Linq.InternalQuery<double?>.ToString()

System.Data.Entity.Infrastructure.DbQuery<double?>.ToString()


Comments: fixed

Viewing all articles
Browse latest Browse all 10318

Trending Articles