Hi,
Once I had a task to make some statistics about database calls. I wanted to use EnableStatistics property of ADO.NET Connection class.
But when I tried to realize this, I was surprised, that after each call of ISQLQuery.AddEntity, ISQLQuery.AddScalar etc. methods a new connection object is generated for ISession.Connection, which breaks the EnableStatistics property to false. Actually, I suppose this is not right behavior and new connection shouldn't recreate each time.
Is there any ways to resolve this problem? Maybe some configuration setup could help to create connection object once?
Thanks.
|