I have a web app that creates a DataContext at the beginning of the request and lets go at the end.
I would like to have some handy stats for each page like
- number of inserts and time spent
- number of deletes and time spent
- number of updates and time spent
- number of selects and time spent
I have it all set for inserts/updates/deletes by implementing the partial methods InsertXXX/UpdateXXX/DeleteXXX and keeping track of counts and time spent.
But, how do I count and time the SELECTs ???
I am not sure there is a hook anywhere in Linq to SQL to be able to insert some measuring?
Thanks