Created
March 19, 2010 02:10
-
-
Save jfromaniello/337149 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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