Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
like this:
ing GetArguments(Function function)
{
StringBuilder s = new StringBuilder();
for(int x = 0; x < function.Parameters.Count; x++)
{
Parameter p = function.Parameters[x];
s.AppendLine();
s.AppendFormat(" [Parameter(DbType=\"{0}\")] ", p.DbType);
if (p.Direction != LinqToSqlShared.DbmlObjectModel.ParameterDirection.In)
s.Append("ref ");
s.AppendFormat("{0} @{1}",GetParameterType(p), p.ParameterName);
if (x < function.Parameters.Count - 1)
s.Append(", ");
}
return s.ToString();
}
public string GetParameterType(Parameter p)
{
if (CommonUtility.IsNullableType(p.Type))
return CSharpAlias[p.Type] + "?";
else
return CSharpAlias[p.Type];
}
public string GetArgumentNames(Function function)
{
StringBuilder s = new StringBuilder();
for(int x = 0; x < function.Parameters.Count; x++)
{
if (x < function.Parameters.Count)
s.Append(", ");
Parameter p = function.Parameters[x];
s.AppendFormat("@{0}", p.ParameterName);
}
return s.ToString();
}
Original comment by kachalkov
on 14 May 2009 at 5:07
Original comment by shannon....@gmail.com
on 15 May 2009 at 7:10
fixed this bug. thanks for reporting.
Original comment by paul.wel...@gmail.com
on 18 May 2009 at 5:39
Original issue reported on code.google.com by
kachalkov
on 14 May 2009 at 3:23