eg.
var result = myObject.Where(x => x.prop == 5);
string s = result.toSQL();
Result:
s
is "SELECT * FROM [myObjects] WHERE prop = 5"
If it's IQueryable
/ObjectQuery
you can use ToTraceString
. If it's IDbSet/DbSet you can use ToString
directly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With