我有SqlServerQueryVisualizer。當我將鼠標懸停在「accounts」變量上時,我可以看到SQL。但是,當我將鼠標懸停在「結果」變量上時,它不顯示SQL查詢。如何在下面的代碼中查看「results」變量的SQL查詢?Sql Server Query Visualizer - 看不到生成的SQL查詢
public IEnumerable<T> FindAll(Func<T, bool> predicate)
{
LibraryManagementClassesDataContext db = new LibraryManagementClassesDataContext("");
var accounts = from p in db.Accounts
where p.AccountNumber == 1
select p;
//Where
var results = Context.GetTable<T>().Where(predicate);
return results;
}
另外,我有一個插入功能。如何查看此場景的生成查詢?
public virtual void InsertOnSubmit(T entity)
{
GetTable().InsertOnSubmit(entity);
}