protected void AddParam( ISqlObjectFactory factory, ISqlCommand sqlCommand, string name, object value, int?commandCount) { var key = name + commandCount; if (!sqlCommand.Parameters.Contains(key)) { sqlCommand.Parameters_Add(factory.CreateSqlParameter(key, value)); } }