This looks correct. If it is not working, I would try adding a DbType, DefaultValue and/or ConvertEmptyStringToNull paramenter.
DbType –The Data Type of the SQL Parameter DefaultValue (Optional) – Here you can specify the Default Value of the Parameter when the QueryString Parameter is missing or not supplied. ConvertEmptyStringToNull (Optional) – As the Name suggests this will set the Parameter value to NULL when it is empty or blank.