views:

33

answers:

0

I'm interested in making a generic tool to log database calls in ASP.Net by page so I need the stack trace as well. Idea is similar to http://l2sprof.com/, but for straight ADO.Net. Essentially I want to make a tool I can add to any project that can generate some statistics by page/class of # of calls and what calls are made so I can go back to developers being too chatty with the db, doing queries in loops, etc.

Some ideas:

  • Can PostSharp can help in any way? I've never used it, but it looks intriguing. I see it's not free any more though and this is just a toy project of mine at the moment.
  • What about creating DbProviderFactory that's essentially a logging proxy for System.Data.SqlClient?