in src/SqlBindingUtilities.cs [141:158]
public static SqlCommand BuildCommand(SqlAttribute attribute, SqlConnection connection)
{
var command = new SqlCommand
{
Connection = connection,
CommandText = attribute.CommandText
};
if (attribute.CommandType == CommandType.StoredProcedure)
{
command.CommandType = CommandType.StoredProcedure;
}
else if (attribute.CommandType != CommandType.Text)
{
throw new ArgumentException("The type of the SQL attribute for an input binding must be either CommandType.Text for a direct SQL query, or CommandType.StoredProcedure for a stored procedure.");
}
ParseParameters(attribute.Parameters, command);
return command;
}