Hi
I found a bug in .netTiers v2.0.1.471 when generating custom methods from a store procedure that is using output params.
This bug is that in the \DataAccessLayer.SqlClient\SqlEntityProviderBase.generated.cst file in the CUSTOM METHODS section where the outputValues string is building:
<%
//Set up the output params
StringBuilder outputValues = new StringBuilder();
foreach(ParameterSchema outParam in command.AllOutputParameters)
{
outputValues.AppendFormat("\t\t\t{0} = Utility.GetParameterValue<{1}>(commandWrapper.Parameters[\"{2}\"]);\n",GetPrivateName(outParam), GetCSType(outParam), outParam);
}
%>
and it should be
<%
//Set up the output params
StringBuilder outputValues = new StringBuilder();
foreach(ParameterSchema outParam in command.AllOutputParameters)
{
outputValues.AppendFormat("\t\t\t{0} =
Utility.GetParameterValue<{1}>(commandWrapper.Parameters[\"{2}\"]);\n",GetPrivateName(outParam),
GetCSType(outParam), outParam.Name);
}
%>
because it retrieves values from the commandWrapper.Parameters["dbo.SP_NAME.@OutputParam"] and should be ommandWrapper.Parameters["@OutputParam"].