How to log NHibernate SQL to ASP.NET Core loggers

added by DotNetKicks
8/20/2020 4:09:20 AM

220 Views

Logging down SQL created by ORM is useful when debugging new features of application. SQL logging in NHibernate is a little bit tricky and not so straightforward as it is with Entity Framework Core. This blog post demonstrates how to log SQL created by NHibernate to ASP.NET Core logger using NHibernate interceptor.


0 comments