> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# TursoQueryBuilder

> Provides fluent query building capabilities for TursoDbSet.

## Definition

**Assembly:** CloudNimble.BlazorEssentials.TursoDb.dll

**Namespace:** CloudNimble.BlazorEssentials.TursoDb.Query

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity>
```

## Summary

Provides fluent query building capabilities for TursoDbSet.

## Type Parameters

* `TEntity` - The entity type being queried.

## Constructors

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> .ctor <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Methods

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> AnyAsync

Checks if any entities match the query.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task<bool> AnyAsync()
```

#### Returns

Type: `System.Threading.Tasks.Task<bool>`
True if any entities match.

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> CountAsync

Executes the query and returns the count of matching entities.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task<int> CountAsync()
```

#### Returns

Type: `System.Threading.Tasks.Task<int>`
The count of matching entities.

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Equals <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name  | Type      | Description |
| ----- | --------- | ----------- |
| `obj` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Equals <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name   | Type      | Description |
| ------ | --------- | ----------- |
| `objA` | `object?` | -           |
| `objB` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> FirstOrDefaultAsync

Executes the query and returns the first matching entity, or null.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task<TEntity> FirstOrDefaultAsync()
```

#### Returns

Type: `System.Threading.Tasks.Task<TEntity?>`
The first matching entity or null.

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> GetHashCode <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> GetType <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> MemberwiseClone <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> OrderBy

Adds an ORDER BY clause (ascending).

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity> OrderBy(string column)
```

#### Parameters

| Name     | Type     | Description             |
| -------- | -------- | ----------------------- |
| `column` | `string` | The column to order by. |

#### Returns

Type: `CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity>`
The query builder for chaining.

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> OrderByDescending

Adds an ORDER BY clause (descending).

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity> OrderByDescending(string column)
```

#### Parameters

| Name     | Type     | Description             |
| -------- | -------- | ----------------------- |
| `column` | `string` | The column to order by. |

#### Returns

Type: `CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity>`
The query builder for chaining.

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> ReferenceEquals <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name   | Type      | Description |
| ------ | --------- | ----------- |
| `objA` | `object?` | -           |
| `objB` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Skip

Skips the specified number of results.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity> Skip(int count)
```

#### Parameters

| Name    | Type  | Description                    |
| ------- | ----- | ------------------------------ |
| `count` | `int` | The number of results to skip. |

#### Returns

Type: `CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity>`
The query builder for chaining.

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Take

Limits the number of results returned.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity> Take(int count)
```

#### Parameters

| Name    | Type  | Description                    |
| ------- | ----- | ------------------------------ |
| `count` | `int` | The maximum number of results. |

#### Returns

Type: `CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity>`
The query builder for chaining.

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> ToListAsync

Executes the query and returns all matching entities.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task<System.Collections.Generic.List<TEntity>> ToListAsync()
```

#### Returns

Type: `System.Threading.Tasks.Task<System.Collections.Generic.List<TEntity>>`
A list of matching entities.

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> ToString <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Where

Adds a WHERE clause to the query.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity> Where(string clause, params object[] parameters)
```

#### Parameters

| Name         | Type        | Description                                       |
| ------------ | ----------- | ------------------------------------------------- |
| `clause`     | `string`    | The WHERE clause (e.g., "name = ?" or "age > ?"). |
| `parameters` | `object?[]` | The parameters for the clause.                    |

#### Returns

Type: `CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity>`
The query builder for chaining.

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> WhereEquals

Adds a WHERE clause for equality.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity> WhereEquals(string column, object value)
```

#### Parameters

| Name     | Type      | Description           |
| -------- | --------- | --------------------- |
| `column` | `string`  | The column name.      |
| `value`  | `object?` | The value to compare. |

#### Returns

Type: `CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity>`
The query builder for chaining.

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> WhereIn

Adds a WHERE IN clause.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity> WhereIn(string column, params object[] values)
```

#### Parameters

| Name     | Type       | Description          |
| -------- | ---------- | -------------------- |
| `column` | `string`   | The column name.     |
| `values` | `object[]` | The values to match. |

#### Returns

Type: `CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity>`
The query builder for chaining.

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> WhereLike

Adds a WHERE clause for LIKE matching.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity> WhereLike(string column, string pattern)
```

#### Parameters

| Name      | Type     | Description                             |
| --------- | -------- | --------------------------------------- |
| `column`  | `string` | The column name.                        |
| `pattern` | `string` | The LIKE pattern (use % for wildcards). |

#### Returns

Type: `CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity>`
The query builder for chaining.

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> WhereNotNull

Adds a WHERE clause for NOT NULL check.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity> WhereNotNull(string column)
```

#### Parameters

| Name     | Type     | Description      |
| -------- | -------- | ---------------- |
| `column` | `string` | The column name. |

#### Returns

Type: `CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity>`
The query builder for chaining.

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> WhereNull

Adds a WHERE clause for NULL check.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity> WhereNull(string column)
```

#### Parameters

| Name     | Type     | Description      |
| -------- | -------- | ---------------- |
| `column` | `string` | The column name. |

#### Returns

Type: `CloudNimble.BlazorEssentials.TursoDb.Query.TursoQueryBuilder<TEntity>`
The query builder for chaining.
