NetTiers generates methods for custom stored procedures that require nullable parameters
When generating methods for custom stored procedures using NetTiers all the paramters of Int, Decimal, etc get defined as Int32?, Decimal? as nullable parameters.
NetTiers says,
The problem is that a param of a stored procedure is always nullable. You can’t have it not accept a null, you can however, have it use a default value. So CodeSmith’s AllowDbNull property on the object is always true.
CSPUseDefaultValForNonNullableTypes, set that to true, and it will attempt to use see if the DefaultValue is not = NULL, then it will not make it a regular value type. This of course only works for value types.
So the fix was to edit the template and
in section #07. CRUD – Advanced
change the value for CSPUseDefaultValForNonNullableTypes to True.
Advertisement
Like this:
Be the first to like this post.