How to track linq query when using PredicateBuilder / AsExpandable?

I am using PredicateBuilder, which means that I am using the AsExpandable extension method. The problem is that I can no longer track my SQL queries, since the following error occurs when I try to pass an ObjectQuery query so that I can make an ObjectQuery.ToTraceString () call on it ...

Cannot pass an object of type "LinqKit.ExpandableQuery`1 [Genesis.Person]" to enter "System.Data.Objects.ObjectQuery".

Any ideas?

+1
source share
3 answers

Dump() LINQPad SQL, , SQL , , LINQPad Entity Framework, F4, LinqKit.dll LinqKit . , , .

+4

PredicateBuilder LinqKit:

http://petemontgomery.wordpress.com/2011/02/10/a-universal-predicatebuilder/

ObjectQuery.ToTraceString() .

+3

, SQL- (, , MSSQL)?

, , ...

+1

Source: https://habr.com/ru/post/1687369/


All Articles