Catching calling method name in IDbCommandInterceptor
问题 I am using IDbCommandInterceptor to catch Entity Framework queries. This way I can access some crucial information such as DbParameter s and DbCommand etc. Bu I also need to get where this query is called from. I have tried to get this by by using StackTrace : StackTrace stackTrace = new StackTrace(); System.Reflection.MethodBase methodBase = stackTrace.GetFrame(1).GetMethod(); This might work in regular method calls, but in this instance since I am intercepting the Entity Framework mechanism