# Eval

> Implement this function to evaluate the query on a payload.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Search](/engine/6000.7/script-reference/unityeditor/search.md)
* **Assembly:** UnityEditor

## Eval(T)

Implement this function to evaluate the query on a payload.

```csharp
IEnumerable<TData> Eval(TPayload payload)
```

### Parameters

**** (T): The input data of the query.

### Returns

| Type                                                                                               | Description                  |
| -------------------------------------------------------------------------------------------------- | ---------------------------- |
| [IEnumerable\<T>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1) | An enumerable of type TData. |

## Eval(T)

Implement this function to evaluate the query on a single element.

```csharp
bool Eval(TData element)
```

### Parameters

**** (T): A single object to be tested.

### Returns

| Type                                                          | Description                                           |
| ------------------------------------------------------------- | ----------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the object passes the query, false otherwise. |
