ALE.Sql.Sql.CreateCommand C# (CSharp) Method

CreateCommand() public method

public CreateCommand ( string commandText, object args = null, CommandType commandType = CommandType.Text ) : SqlCommand
commandText string
args object
commandType CommandType
return System.Data.SqlClient.SqlCommand
        public SqlCommand CreateCommand(string commandText, object args = null, CommandType commandType = CommandType.Text)
        {
            var cmd = new SqlCommand(commandText, Connection);
            cmd.CommandType = commandType;
            if (args != null)
            {
                cmd.Parameters.AddRange(ConvertObjectToSqlParams(args));
            }
            return cmd;
        }