Thursday, October 1, 2009

subsonic: How to add new datatype support such as timestamp

subsonic makes the timestamp datatype to a String type instead of Byte[].
Follow this steps to add new datatype support:

1. To add new datatype support for your database tables, modify your SQLServer.ttinclude file
and find this function
string GetSysType(string sqlType)

2. Add this piece of codes at the end of the cases
case "timestamp":
sysType= "byte[]";
break;

3. Run Custom Tool. (Right click on the tt files and click run custom tool)

That's it!

No comments:

Post a Comment