How to get SQL clause from Expression

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
maxcpr
Posts: 33
Joined: Wed 10 Dec 2008 14:46

How to get SQL clause from Expression

Post by maxcpr » Wed 30 Jun 2010 09:51

Hi.

Is it possible to get SQL clause from Expression (ExpressionTree)?

Problem is that i'm trying to use Expression to define condition in order to fill general DataTable by one. Since that i don't have DataContext and Queryable object (By the way, am i right? There is no way to cast System.DataTable to IQueriable?). And indeed i can't use DataContext.GetCommand(...) to achive my goal.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 01 Jul 2010 16:01

There is a way to cast System.DataTable to an IQueryable. Take a look at this LINQ to DataSet article.

Post Reply