Skip to content

Instantly share code, notes, and snippets.

@jfromaniello
Created March 19, 2010 02:10
Show Gist options
  • Save jfromaniello/337149 to your computer and use it in GitHub Desktop.
Save jfromaniello/337149 to your computer and use it in GitHub Desktop.
//This is from nhibernate source code
public class MsSql2008Dialect : MsSql2005Dialect
{
// Methods
public MsSql2008Dialect()
{
base.RegisterColumnType(DbType.DateTime2, "DATETIME2");
base.RegisterColumnType(DbType.DateTimeOffset, "DATETIMEOFFSET");
base.RegisterColumnType(DbType.Date, "DATE");
base.RegisterColumnType(DbType.Time, "TIME");
base.RegisterFunction("current_timestamp", new NoArgSQLFunction("sysdatetime", NHibernateUtil.DateTime2, true));
base.RegisterFunction("current_timestamp_offset", new NoArgSQLFunction("sysdatetimeoffset", NHibernateUtil.DateTimeOffset, true));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment