SubSonic 3 does not output stored procedure parameters in the order specified by the stored procedure definition. Instead, SubSonic outputs these in alphabetical order. This is an undesired trait.
To correct this issue, you will need to change several lines within the "SQLServer.ttinclude" file.
Locate the "GetSPParams" function within "SQLServer.ttinclude". Prior to the foreach loop, add in the following line of code:
sprocs.DefaultView.Sort = "ORDINAL_POSITION ASC";
then, change the foreach loop code from:
foreach(DataRow row in sprocs.Rows){
to
foreach(DataRow row in sprocs.DefaultView.ToTable().Rows){
Save the file.