Hey - I was able to get it working, but not as expected...
What I did now, is as follows:
Public Sub LogLinQ(toLog As String) Implements ILogger.LogLinQ
If String.IsNullOrEmpty(toLog.Trim)=False then
And to Register I do the following:
myContext.Database.Log = AddressOf myLogging.LogLinQ
When I now do something like this:
Dim myResult = (From myQuery in myContext.Customers Select myQuery).ToList
Then I get 5 calls of theMethod.
1) Open Connection
5) Close Connection
This isn't smooth... Do you know a better way?