---
title: "Class EntitiesClient"
slug: "js-sdk--entitiesclient"
abstract: ""
---
# Class EntitiesClient

The client responsible for getting, saving and deleting entities.

## Constructors

### EntitiesClient()

#### Declaration

```csharp
new EntitiesClient()
```

### Functions

### getAsync(param, loadConfiguration)

Gets the <xref:IEntity> instance with the specified `id` or `identifier`.

#### Declaration

```csharp
function getAsync(param, loadConfiguration)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
|  | *param* | The id or identifier of the entity to get |
|  | *loadConfiguration* | The loading configuration for the entity |

#### Returns

| Type | Description |
| --- | --- |
|  | The entity or `null` when it was not found. |

### getManyAsync(param, loadConfiguration)

Gets the <xref:IEntity> instances with the specified `ids` or `identifiers`.

#### Declaration

```csharp
function getManyAsync(param, loadConfiguration)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
|  | *param* | The ids or identifiers of the entities to get |
|  | *loadConfiguration* | The loading configuration for an entity |

#### Returns

| Type | Description |
| --- | --- |
|  | List of entities. |

### getByDefinitionAsync()

{@inheritDoc}

#### Declaration

```csharp
function getByDefinitionAsync()
```

### getIdsByDefinitionAsync()

{@inheritDoc}

#### Declaration

```csharp
function getIdsByDefinitionAsync()
```

### getEntityIterator()

{@inheritDoc}

#### Declaration

```csharp
function getEntityIterator()
```

### getEntityIdIterator()

{@inheritDoc}

#### Declaration

```csharp
function getEntityIdIterator()
```

### saveAsync()

{@inheritDoc}

#### Declaration

```csharp
function saveAsync()
```

### deleteAsync()

{@inheritDoc}

#### Declaration

```csharp
function deleteAsync()
```

### createEntityAsync(entity)

Creates the specified <xref:IEntity> in the system.

#### Declaration

```csharp
function createEntityAsync(entity)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
|  | *entity* | The entity to create/save in the system |

### updateEntityAsync(entity)

Update the specified <xref:IEntity>.

#### Declaration

```csharp
function updateEntityAsync(entity)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
|  | *entity* | The entity to update |

### single(queryResult)

Get an <xref:IEntity> or `null` from the specified IEntityQueryResult.

#### Declaration

```csharp
function single(queryResult)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
|  | *queryResult* | The query result (should contain one or no items) |

#### Returns

| Type | Description |
| --- | --- |
|  | An <xref:IEntity> or `null`. |
