Did anybody tried integrating NHibernate.Glimpse with Sharp Lite?

137 views
Skip to first unread message

Sergey Kosik

unread,
Aug 8, 2013, 6:41:46 AM8/8/13
to sharp...@googlegroups.com
Hello,

I've installed the NHibernate Glimpse using nuget but cannot make it logging the queries.
I've followed the wiki (https://github.com/ranzlee/NHibernate.Extensions/wiki/NHibernate.Glimpse ) for configuration and have the required appSettings in web.config:

<appSettings>
<add key="nhibernate-logger" value="NHibernate.Glimpse.LoggerFactory, NHibernate.Glimpse" />
<add key="NHibernate.Glimpse.Loggers" value="command,connection,flush,load,transaction" />
</appSettings>

And registered the factory in DependencyResoverInitializer.cs:

public static void Initialize()
{
ISessionFactory sessionFactory = NHibernateInitializer.Initialize().BuildSessionFactory();

var container = new Container(x =>
{
x.For<ISessionFactory>()
.Singleton()
.Use(() => sessionFactory);
x.For<IEntityDuplicateChecker>().Use<EntityDuplicateChecker>();
x.For(typeof(IRepository<>)).Use(typeof(Repository<>));
x.For(typeof(IRepositoryWithTypedId<,>)).Use(typeof(RepositoryWithTypedId<,>));
});

DependencyResolver.SetResolver(new StructureMapDependencyResolver(container));

NHibernate.Glimpse.Plugin.RegisterSessionFactory(sessionFactory);
}


I can see the NHibernate Tab in the Glimpse panel but the Request Details are empty.

What am I missing?

Thanks,

Sergey.

Reply all
Reply to author
Forward
0 new messages