I am using Ling2SQL (auto generated code), and I am looking for a way to measure how much time my app is spending on database communication.
Database changes are easy to isolate (happens during SubmitChanges), but lookups are much harder to pin down. The lookup seems to occur when I enumerate my Linq.Table object, e.g. when calling ToList(). This might occur anywhere in my source code, so I cannot
put a stopwatch around each of them.
Is there someway to catch these event on a global scale? E.g. override some function so I can measure the time?