# QueryBuilder()

> Gives a fluent API for constructing EntityQuery s similar to the EntityQueryBuilder. This API statically constructs the query as part of the system, and creates the query in the system's OnCreate. Calling this method should allow the construction of EntityQueries with almost no run-time performance overhead."

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public static SystemAPIQueryBuilder QueryBuilder()
```

### Returns

| Type                                                                                             | Description                                                                              |
| ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |
| [SystemAPIQueryBuilder](/engine/7000.0/script-reference/unity/entities/systemapiquerybuilder.md) | An instance of `SystemAPIQueryBuilder`, which can be used to fluently construct queries. |

### Remarks

Gives a fluent API for constructing EntityQueries similar to the EntityQueryBuilder. This API statically constructs the query as part of the system, and creates the query in the system's OnCreate. Calling this method should allow for construction of EntityQueries with almost no run-time performance overhead."
