I have a Linq to objects statement
var confirm = from l in lines.Lines where (l.LineNumber == startline.LineNumber) || (l.LineNumber == endline.LineNumber
While it isn't a way of debugging, I'd suggest using the following:
using (var db = new AppContext()) { db.Database.Log = s => System.Diagnostics.Debug.WriteLine(s); // Rest of code }
You can then check the output window when debugging to see the SQL generated from your LINQ query.