I am trying to use nHibernate IStatistics for my app. I have such a code < Pre> The query is populated with the value for the query query number, but the query string array is always empty. Is there a reason for this? I am using NHibernate 3.0. Do this before running any query: After doing this, the following code: ... will be printed with "foo". Only HQL queries are stored (LINQ also, but only string is not very useful) IStatistics stats = GetSessionFactory (). Statistics; Var queryCount = stats.QueryExecutionCount; Var queries = stats.Queries;
statistics . Istatatics enabled = enabled;
session.CreateQuery ("From Foo"). List (); Console.WriteLine (stats.Queries [0]);
Comments
Post a Comment