Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
- Posts: 33
- Joined: Wed 10 Dec 2008 14:46
Hi guys i am really couldn't realize why there is no way to get SQL request from DataContext if i only know ExpressionTree that describe this request!!!
Please somebody who understand or guess why it so give me suggestion.
- Devart Team
- Posts: 2919
- Joined: Mon 07 Jul 2008 13:16
Try the following code. expr is an Expression instance, context is a DataContext instance.
Code: Select all
var query = Expression.Lambda(expr).Compile().DynamicInvoke();
string s = context.GetCommand((IQueryable)query).CommandText;