How to get SQL clause from Expression

How to get SQL clause from Expression

Postby 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.
maxcpr
 
Posts: 33
Joined: Wed 10 Dec 2008 14:46

Postby 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.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to LinqConnect (LINQ to SQL support)