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

# IndexedDbDatabase

> Provides functionality for accessing IndexedDB from Blazor application

## Definition

**Assembly:** CloudNimble.BlazorEssentials.IndexedDb.dll

**Namespace:** CloudNimble.BlazorEssentials.IndexedDb

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
CloudNimble.BlazorEssentials.IndexedDb.IndexedDbDatabase
```

## Summary

Provides functionality for accessing IndexedDB from Blazor application

## Constructors

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

#### Syntax

```csharp theme={"dark"}
public IndexedDbDatabase(Microsoft.JSInterop.IJSRuntime jsRuntime)
```

#### Parameters

| Name        | Type                             | Description |
| ----------- | -------------------------------- | ----------- |
| `jsRuntime` | `Microsoft.JSInterop.IJSRuntime` | -           |

### <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()
```

## Properties

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

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.IndexedDb.Schema.IndexedDbDatabaseDefinition DatabaseDefinition { get; internal set; }
```

#### Property Value

Type: `CloudNimble.BlazorEssentials.IndexedDb.Schema.IndexedDbDatabaseDefinition`

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

#### Syntax

```csharp theme={"dark"}
public string Name { get; init; }
```

#### Property Value

Type: `string`

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

#### Syntax

```csharp theme={"dark"}
public System.Collections.Generic.List<CloudNimble.BlazorEssentials.IndexedDb.IndexedDbObjectStore> ObjectStores { get; private set; }
```

#### Property Value

Type: `System.Collections.Generic.List<CloudNimble.BlazorEssentials.IndexedDb.IndexedDbObjectStore>`

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

#### Syntax

```csharp theme={"dark"}
public int Version { get; set; }
```

#### Property Value

Type: `int`

## Methods

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

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task CallJavaScriptAsync(string functionName, params object[] args)
```

#### Parameters

| Name           | Type       | Description |
| -------------- | ---------- | ----------- |
| `functionName` | `string`   | -           |
| `args`         | `object[]` | -           |

#### Returns

Type: `System.Threading.Tasks.Task`

#### Exceptions

| Exception            | Description |
| -------------------- | ----------- |
| `IndexedDbException` |             |

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

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task<TResult> CallJavaScriptAsync<TResult>(string functionName, params object[] args)
```

#### Parameters

| Name           | Type        | Description |
| -------------- | ----------- | ----------- |
| `functionName` | `string`    | -           |
| `args`         | `object?[]` | -           |

#### Returns

Type: `System.Threading.Tasks.Task<TResult>`

#### Type Parameters

* `TResult` -

#### Exceptions

| Exception            | Description |
| -------------------- | ----------- |
| `IndexedDbException` |             |

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

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task ConsoleLog(params object[] args)
```

#### Parameters

| Name   | Type       | Description |
| ------ | ---------- | ----------- |
| `args` | `object[]` | -           |

#### Returns

Type: `System.Threading.Tasks.Task`

#### Exceptions

| Exception            | Description |
| -------------------- | ----------- |
| `IndexedDbException` |             |

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

This function provides the means to add a store to an existing database,

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task CreateObjectStoreAsync(CloudNimble.BlazorEssentials.IndexedDb.IndexedDbObjectStore objectStore)
```

#### Parameters

| Name          | Type                                                          | Description |
| ------------- | ------------------------------------------------------------- | ----------- |
| `objectStore` | `CloudNimble.BlazorEssentials.IndexedDb.IndexedDbObjectStore` | -           |

#### Returns

Type: `System.Threading.Tasks.Task`

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

Deletes this IndexedDb instance from the browser.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task DeleteDatabaseAsync()
```

#### Returns

Type: `System.Threading.Tasks.Task`

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

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task EnsureIsOpenAsync()
```

#### Returns

Type: `System.Threading.Tasks.Task`

### <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="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" /> LoadSchemaAsync

Load database schema from databaseName

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task LoadSchemaAsync()
```

#### Returns

Type: `System.Threading.Tasks.Task`

### <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" /> OpenAsync

Opens the IndexedDB defined in the DbDatabase. Under the covers will create the database if it does not exist
and create the stores defined in DbDatabase.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task OpenAsync()
```

#### Returns

Type: `System.Threading.Tasks.Task`

### <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="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?`
