Search This Blog

Wednesday, October 3, 2012

C#/.NET Get NHibernate session information/database type/capabilities

Before changing the database structure (adding/removing columns or adding/removing comments to certain columns) you need to know which operations are allowed on a specific database type. This can be retrieved as follows:

var dialect = (Dialect)HibernateTemplate.Execute(del => del.GetSessionImplementation().Factory.Dialect;

Commenting capability (which is impossible in SQLite) can be read from:



  1. Hey your blog rules :)

    Greetings from a german blogger Partner :)

  2. Bartosz

    This is WAY easier to use than NHibernate:

    1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from .Net Training in Chennai. or learn thru ASP.NET Essential Training Online


If you like this post, please leave a comment :)