OracleFunctions don't work in LinqPad?

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
rmagruder
Posts: 47
Joined: Thu 26 Jun 2014 17:12

OracleFunctions don't work in LinqPad?

Post by rmagruder » Wed 07 Jan 2015 13:41

I'm trying to prototype some queries using LinqPad and dotConnect

Unfortunately, I need to use OracleFunctions, and while I have added the correct (EF6) version of DevArt.Data.Oracle.Entity to the namespace and references, and LinqPad sees the OracleFunctions class as valid for intellisense now, when I run the query:

The method 'ToChar' is not supported

at IQToolkit.Data.Common.SqlFormatter.VisitMethodCall(MethodCallExpression m)
at IQToolkit.Data.OracleCore.PLSqlFormatter.VisitMethodCall(MethodCallExpression m)
at IQToolkit.ExpressionVisitor.Visit(Expression exp)
at IQToolkit.Data.Common.DbExpressionVisitor.Visit(Expression exp)
at IQToolkit.Data.Common.SqlFormatter.Visit(Expression exp)
at IQToolkit.Data.Common.SqlFormatter.VisitValue(Expression expr)
at IQToolkit.Data.OracleCore.PLSqlFormatter.VisitValue(Expression expr)
at IQToolkit.Data.Common.SqlFormatter.VisitBinary(BinaryExpression b)
at IQToolkit.Data.OracleCore.PLSqlFormatter.VisitBinary(BinaryExpression b)
at IQToolkit.ExpressionVisitor.Visit(Expression exp)
at IQToolkit.Data.Common.DbExpressionVisitor.Visit(Expression exp)
at IQToolkit.Data.Common.SqlFormatter.Visit(Expression exp)
at IQToolkit.Data.Common.SqlFormatter.VisitPredicate(Expression expr)
at IQToolkit.Data.Common.SqlFormatter.VisitBinary(BinaryExpression b)
at IQToolkit.Data.OracleCore.PLSqlFormatter.VisitBinary(BinaryExpression b)
at IQToolkit.ExpressionVisitor.Visit(Expression exp)
at IQToolkit.Data.Common.DbExpressionVisitor.Visit(Expression exp)
at IQToolkit.Data.Common.SqlFormatter.Visit(Expression exp)
at IQToolkit.Data.Common.SqlFormatter.VisitPredicate(Expression expr)
at IQToolkit.Data.Common.SqlFormatter.VisitJoin(JoinExpression join)
at IQToolkit.Data.Common.SqlFormatter.VisitSource(Expression source)
at IQToolkit.Data.Common.SqlFormatter.VisitSelect(SelectExpression select)
at IQToolkit.Data.OracleCore.PLSqlFormatter.VisitSelect(SelectExpression select)
at IQToolkit.Data.Common.DbExpressionVisitor.Visit(Expression exp)
at IQToolkit.Data.Common.SqlFormatter.Visit(Expression exp)
at IQToolkit.Data.OracleCore.PLSqlFormatter.VisitTopLevelExpression(Expression exp)
at IQToolkit.Data.OracleCore.PLSqlFormatter.Format(Expression expression, QueryLanguage language)
at IQToolkit.Data.OracleCore.PLSqlLanguage.PLSqlLinguist.Format(Expression expression)
at IQToolkit.Data.Common.ExecutionBuilder.ExecuteProjection(ProjectionExpression projection, Boolean okayToDefer)
at IQToolkit.Data.Common.ExecutionBuilder.VisitProjection(ProjectionExpression projection)
at IQToolkit.Data.Common.DbExpressionVisitor.Visit(Expression exp)
at IQToolkit.Data.Common.ExecutionBuilder.Build(Expression expression)
at IQToolkit.Data.Common.ExecutionBuilder.Build(QueryLinguist linguist, QueryPolicy policy, Expression expression, Expression provider)
at IQToolkit.Data.Common.QueryPolice.BuildExecutionPlan(Expression query, Expression provider)
at IQToolkit.Data.EntityProvider.GetExecutionPlan(Expression expression)
at IQToolkit.Data.EntityProvider.Execute(Expression expression)
at IQToolkit.Data.EntitySession.SessionProvider.Execute(Expression expression)
at IQToolkit.Query`1.System.Collections.IEnumerable.GetEnumerator()
at LINQPad.ObjectGraph.ListNode.<GetItems>d__8.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at LINQPad.ObjectGraph.ListNode..ctor(ObjectNode parent, IEnumerable list, GraphOptions options, String name)
at LINQPad.ObjectGraph.ObjectNode.CreateInternal(ObjectNode parent, Object item, GraphOptions options)

Help?

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: OracleFunctions don't work in LinqPad?

Post by Shalex » Thu 08 Jan 2015 15:24

I cannot reproduce the problem at the moment. Please follow the steps from http://forums.devart.com/viewtopic.php? ... 95#p106399. dotConnect for Oracle-specific note: use the code-based registration of EF6 provider http://blog.devart.com/entity-framework ... #CodeBased (it should be specified manually). Also set Copy Local=True for the Devart.Data.Oracle.Entity reference in your Visual Studio project. Now the following C# Expression should work:

Code: Select all

from a
	in new SCOTTModel.SCOTTEntities().DEPTs
	where Devart.Data.Oracle.Entity.OracleFunctions.Lower(a.DNAME)=="accounting"
	select a
Notify us about the result.

rmagruder
Posts: 47
Joined: Thu 26 Jun 2014 17:12

Re: OracleFunctions don't work in LinqPad?

Post by rmagruder » Tue 27 Jan 2015 16:25

Will do. I'll let you know when I get it working or if not, what the outcome is.

Post Reply