Just trying to get the sql that is generated by a linq query.
With Linq2Sql
dc.GetCommand(query).CommandText
see http://msdn.microsoft.com/en-us/library/system.data.linq.datacontext.getcommand.aspx for more info.
But I usually use LinqPad
2.1m questions
2.1m answers
60 comments
57.0k users