When I pass a string variable to the ObjetParameter parameter it gives the following error.
string nomeParameter = sql.Substring(startPosition, stopPosition - startPosition);
ObjectParameter parameter = new ObjectParameter(nomeParameter, parameters[contador]);
Additional information: The specified parameter name 'DESCRIPTION' is not valid. Parameter names must begin with a letter and can only contain letters, numbers, and underscores.
If you pass the parameter as below, the error does not occur:
ObjectParameter parameter = new ObjectParameter("DESCRICAO", parameters[contador]);
Would you have a problem with Culture? but the constructor of the object does not provide put Culture.